• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

(Help!) AoE at random point

Status
Not open for further replies.
Level 3
Joined
Jan 3, 2012
Messages
39
Jep, I'm sorry, but here I am again with a new problem.
This time I searched in 3 Tutorial sections of different sites to find the answer... but I didn't succeed.
But I think, this is a more complex Problem...

So, here is my Problem: I am working on an Boss-Fight of an RPG map (Same map as last times). After 50% of the boss life the trigger should start.
It should create 2 specialeffects at the position of an random units position (Unit controlled by the players) and after 1,5secs an explosion should trigger (specialeffect + AoE-Dmg).
This should happen for the rest of the fight.

Just as a little summary:

A random unit in an area, for the rest of the fight + specialeffects and AoE Dmg

I made a screenshot of the trigger I figured out. I can tell you: It doesn't work. It leads the game to crash because of an memory leak.
I first tried out an loop but I deleted that, cause it didn't work too...

So, can anybody help me and maybe explain to me how I can make triggers like this work? Because I gonna make such a trigger again for an bossfight in that map.

Thank you!
 

Attachments

  • Help_trigger.jpg
    Help_trigger.jpg
    107.1 KB · Views: 71
Level 3
Joined
Jan 3, 2012
Messages
39
Okay. So, I tried to fix it now... but it doesn#t really work... stell get a big lag and my testhero dies.

Put in the Loop, cause this should repeat till the Boss dies...

Made a screenshot again
 

Attachments

  • Help!.jpg
    Help!.jpg
    216.6 KB · Views: 79
Level 3
Joined
Jan 3, 2012
Messages
39
  • KannonenmeisterBeginn
    • Ereignisse
      • Einheit - Kannonenmeister Willey 0004 <gen> Nimmt Schaden
    • Bedingungen
    • Aktionen
      • Set Kannonenbeschuss_Gruppe = (Units in (Playable map area) owned by Spieler 2 (Blau))
      • Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 3 (Blaugrau)) to Kannonenbeschuss_Gruppe
      • Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 4 (Lila)) to Kannonenbeschuss_Gruppe
      • Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 5 (Gelb)) to Kannonenbeschuss_Gruppe
      • Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 6 (Orange)) to Kannonenbeschuss_Gruppe
      • Auslöser - Turn on Kannonenmeister <gen>
  • Kannonenmeister
    • Ereignisse
    • Bedingungen
      • (Percentage life of Kannonenmeister Willey 0004 <gen>) Kleiner als 55.00
    • Aktionen
      • Auslöser - Turn on KannonenmeisterEnde <gen>
      • Set Kannonenbeschuss_Position = (Position of (Random unit from Kannonenbeschuss_Gruppe))
      • For each (Integer B) from 1 to 10, do (Actions)
        • Schleifen - Aktionen
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
          • Set Kannonenbeschuss_SpEf[1] = (Last created special effect)
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[1]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Other\Aneu\AneuTarget.mdl
          • Set Kannonenbeschuss_SpEf[2] = (Last created special effect)
          • Wait 1.50 seconds
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[2]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
          • Einheit - Cause Kannonenmeister Willey 0004 <gen> to damage circular area after 0.00 seconds of radius 25.00 at Kannonenbeschuss_Position, dealing 100.00 damage of attack type Belagerung and damage type Demolierung
          • Spezialeffekt - Destroy (Last created special effect)
  • KannonenmeisterEnde
    • Ereignisse
      • Einheit - Kannonenmeister Willey 0004 <gen> Stirbt
    • Bedingungen
    • Aktionen
      • Auslöser - Turn off Kannonenmeister <gen>
      • Auslöser - Turn off KannonenmeisterBeginn <gen>
      • Auslöser - Turn off (This trigger)
It's not basicly a spell. It's just a "Phase" of the fight against a boss...
And yes it's takes damage. I could try to translate the trigger for you, if it helps you but I am not 100% sure with the translations.

And, well, I described what should happen in my first post... but I can try to sum it up:

At 50% of the boss lifes at the position of a random player in an area 2 specialeffects spawn on the ground. After 1,5sec they disappear and an explosion (specialeffect) plus an AOE damage will trigger and damage near units. This should repeat again and again till the boss dies.
 
Level 3
Joined
Jan 3, 2012
Messages
39
Well... it actually isn't the Damage area... I deleted it and it still laggs. It must be the
Unit Group - Add all Units blabla part. I changed it too an "If-Then-Else" command, that will check, if the player is ingame and will then add it to the group, else do nothing... doesn't really work too...

How I made it:

  • If ((Spieler 3 (Blaugrau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 3 (Blaugrau)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
Edit: Even after the change to the IF-Then-Else the problem exists...
 
Well that's gonna leak a unit group as well, but leaks don't cause crashes until you get tens of thousands of them, usually.

The crash would be caused if you damage "Kannonenmeister Willey 0004" from this trigger that you're using. So I recommend turning OFF this trigger, then dealing your damage, etc., then turn the trigger back ON. The way you have it now it might cause an infinite loop, because the cannon master:

1. gets damaged once
2. event fires
3. damaged again from that event
4. go back to step 2
...
infinite loop divide by 0 totally awesome crash
 
Level 3
Joined
Jan 3, 2012
Messages
39
I am pretty sure, that I understood what you meant, but I am not quite sure, If I understand you right... I will try out an alternativ version...
 
Level 3
Joined
Jan 3, 2012
Messages
39
  • KannonenmeisterBeginn
    • Ereignisse
      • Einheit - Kannonenmeister Willey 0004 <gen> Nimmt Schaden
    • Bedingungen
    • Aktionen
      • Auslöser - Turn on Kannonenmeister <gen>
      • Auslöser - Turn off (This trigger)
  • Kannonenmeister
    • Ereignisse
    • Bedingungen
      • (Percentage life of Kannonenmeister Willey 0004 <gen>) Kleiner als 55.00
    • Aktionen
      • Auslöser - Turn on KannonenmeisterEnde <gen>
      • If ((Spieler 2 (Blau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 2 (Blau)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 3 (Blaugrau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 3 (Blaugrau)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 4 (Lila) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 4 (Lila)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 5 (Gelb) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 5 (Gelb)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 6 (Orange) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 6 (Orange)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • Set Kannonenbeschuss_Position = (Position of (Random unit from Kannonenbeschuss_Gruppe))
      • For each (Integer B) from 1 to 10, do (Actions)
        • Schleifen - Aktionen
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
          • Set Kannonenbeschuss_SpEf[1] = (Last created special effect)
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[1]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Other\Aneu\AneuTarget.mdl
          • Set Kannonenbeschuss_SpEf[2] = (Last created special effect)
          • Wait 1.50 seconds
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[2]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
          • Spezialeffekt - Destroy (Last created special effect)
That should work, or?
 
Level 3
Joined
Jan 3, 2012
Messages
39
Okay... I don't have any Lags now... but the Trigger doesn't seem to work too... so simple nothing happens during the fight... Brrrrrrrrrrrrr so complicated!
 
I have highlighted your leaks:

JASS:
If ((Spieler 2 (Blau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of @(Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 2 (Blau))@ to Kannonenbeschuss_Gruppe) else do (Do nothing)
If ((Spieler 3 (Blaugrau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of @(Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 3 (Blaugrau))@ to Kannonenbeschuss_Gruppe) else do (Do nothing)
If ((Spieler 4 (Lila) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of @(Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 4 (Lila))@ to Kannonenbeschuss_Gruppe) else do (Do nothing)
If ((Spieler 5 (Gelb) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of @(Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 5 (Gelb))@ to Kannonenbeschuss_Gruppe) else do (Do nothing)
If ((Spieler 6 (Orange) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of @(Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 6 (Orange))@ to Kannonenbeschuss_Gruppe) else do (Do nothing)
Set @Kannonenbeschuss_Position@ = (Position of (Random unit from Kannonenbeschuss_Gruppe)) //You didn't remove this location
 
Level 3
Joined
Jan 3, 2012
Messages
39
  • Kannonenmeister
    • Ereignisse
    • Bedingungen
      • (Percentage life of Kannonenmeister Willey 0004 <gen>) Kleiner als 55.00
    • Aktionen
      • Auslöser - Turn on KannonenmeisterEnde <gen>
      • If ((Spieler 2 (Blau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 2 (Blau)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 3 (Blaugrau) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 3 (Blaugrau)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 4 (Lila) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 4 (Lila)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 5 (Gelb) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 5 (Gelb)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • If ((Spieler 6 (Orange) slot status) Gleich Spielt) then do (Einheitengruppe - Add all units of (Units in KannonenbeschussGruppeDefinition <gen> owned by Spieler 6 (Orange)) to Kannonenbeschuss_Gruppe) else do (Do nothing)
      • For each (Integer B) from 1 to 30, do (Actions)
        • Schleifen - Aktionen
          • Set Kannonenbeschuss_Position = (Position of (Random unit from Kannonenbeschuss_Gruppe))
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
          • Set Kannonenbeschuss_SpEf[1] = (Last created special effect)
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[1]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Other\Aneu\AneuTarget.mdl
          • Set Kannonenbeschuss_SpEf[2] = (Last created special effect)
          • Wait 1.50 seconds
          • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[2]
          • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
          • Spezialeffekt - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_Kannonenbeschuss_Position)
So I noticed, that I set just ONE Position. It will be the Same for the Rest of the fight. So I put the "Set Variable" into the Loop and the "Delete Point" too... I think, that should work...
 
Level 3
Joined
Jan 3, 2012
Messages
39
Okay... anyway the trigger still doesn't work... it doesn't crash the game anymore, but the Specialeffects aren't created too and so on. So the most important part of the trigger doesn't work/trigger/whatsoever...
 
Change this:

  • Set Kannonenbeschuss_Position = (Position of (Random unit from Kannonenbeschuss_Gruppe))
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
  • Set Kannonenbeschuss_SpEf[1] = (Last created special effect)
  • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[1]
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Other\Aneu\AneuTarget.mdl
  • Set Kannonenbeschuss_SpEf[2] = (Last created special effect)
  • Wait 1.50 seconds
  • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[2]
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
  • Spezialeffekt - Destroy (Last created special effect)
  • Custom script: call RemoveLocation(udg_Kannonenbeschuss_Position)
To this:

  • Set Kannonenbeschuss_Position = (Position of (Random unit from Kannonenbeschuss_Gruppe))
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Orc\WarDrums\DrumsCasterHeal.mdl
  • Set Kannonenbeschuss_SpEf[1] = (Last created special effect)
  • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[1]
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Spells\Other\Aneu\AneuTarget.mdl
  • Set Kannonenbeschuss_SpEf[2] = (Last created special effect)
  • Spezialeffekt - Destroy Kannonenbeschuss_SpEf[2]
  • Spezialeffekt - Create a special effect at Kannonenbeschuss_Position using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
  • Spezialeffekt - Destroy (Last created special effect)
  • Custom script: call RemoveLocation(udg_Kannonenbeschuss_Position)
  • Wait 1.50 seconds
That should be what you're looking for.

Also, you should probably learn JASS.
 
Level 3
Joined
Jan 3, 2012
Messages
39
If I see this right, you just switcht the Wait Timer from the Position unter the SpEf2 Variable to the last point of the trigger... so this would lead the trigger to play the SpEf one after another... no, that's not what I am looking for.

What should happen is: The first 2 SpEf will spawn as an little "mark" for the upcoming explosion so that the player who's targeted can walk out of the area. He get's 1,5secs to walk away... so the wait function has to be just before the last SpEf and the (Now missing) Damage dealt.

Uhm... I will just make this map and maybe maybe a second one. Jass would take me too much time to learn. So... no Jass for me. The default possibilities are ok too but this is my first map I trigger so...
 
Level 3
Joined
Jan 3, 2012
Messages
39
Why not? And are there other possibilities?

Sooo... what's if I make another trigger for the SpEf Explosion and Damage that is time based such like: Every 1,5sec of the game to blabla and that is triggered in the loop. So I can put the Wait to the End of the loop that it will wait the same timelimit and turn of the Explosionthing and turn it on again with the new Point... uhm... not sure if I described it in an understandable way... hope my main Idea get's clear...
 
Last edited by a moderator:
Level 3
Joined
Jan 3, 2012
Messages
39
Yeah sorry, didn't thought of editing the post before cause the next one had an completely different meaning... but whatsoever.

What is wrong with the trigger... once again: It doesn't work.
There were 2 problems:
1. The trigger causes lags or crashes => Is now fixed.
2. Since 1. is fixed => The trigger doesn't work and I have no idea why.

I am thinking about timers too at the moment, will try it out later, I am too tired now.

Still Jass would take me too long to learn. It's easier for me to work with blizzards trigger editor which I... well... understand a bit... but which I still understand better than Jass.
From the Time to Learn/Usage ratio Jass simple wouldn't be lucrativ.
Spend a few days on Jass to work on one map... maybe a second... doesn't sound like a good deal for me.

Uhm... don't want to be unthankful with that, don't get me wrong. ;)
 
What I'm trying to say is, the trigger you're trying to make is already out of GUI's realistic scope of use. It can certainly be done, but anyone who tries to help you is wasting their time because in JASS, the same thing can be done in less time on less lines.

If you would like to learn jass you can PM me.
 
Status
Not open for further replies.
Top