Problem with some triggers

The_Reaping

Member
Reaction score
2
Okay so what i'm trying to do is create a impossible bosses-esque type map with the players fighting bosses that vary and range from medium - hard difficulty but i'm having some trouble with abilities being cast by the first boss. One of the triggers works once and then won't work again and the other won't work at all :/ Here are the triggers.


This is the ability that doesn't work at all.

Run Fire Wave

Trigger:
  • Run Fire Wave
    • Events
      • Time - Every (Random real number between 10.00 and 14.00) seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IfritsAbilities[1] Equal to Fire Wave <gen>
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Trigger - Run Fire Wave <gen> (ignoring conditions)


Fire Wave

Trigger:
  • Fire Wave
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_IfritsAbilities[1] = gg_trg_Fire_Wave
      • Set Target = Hero[(Random integer number between 1 and numOfPlayers)]
      • Unit - Add Fire Wave to FirelordIfrit
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Wait 0.10 seconds
          • Unit - Order FirelordIfrit to Orc Tauren Chieftain - Shockwave (Position of Target)
      • Unit - Remove Fire Wave from (Triggering unit)
      • Custom script: set udg_IfritsAbilities[1] = null
      • Trigger - Turn off (This trigger)


This is the ability that works once and then doesn't work again :/

Run Flame Strike

Trigger:
  • Run Flame Strike
    • Events
      • Time - Every (Random real number between 7.00 and 9.00) seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IfritsAbilities[2] Equal to Flame Strike <gen>
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Trigger - Run Flame Strike <gen> (ignoring conditions)


Flame Strike

Trigger:
  • Flame Strike
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_IfritsAbilities[2] = gg_trg_Flame_Strike
      • Set Count = 0
      • Unit - Set FirelordIfrit movement speed to 0.00
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Count = (Count + 1)
          • Unit - Create 1 Spell Dummy for (Owner of FirelordIfrit) at (Position of FirelordIfrit) facing Default building facing degrees
          • Set FlameStrikeArray[Count] = (Last created unit)
          • Unit - Add Flame Strike to FlameStrikeArray[Count]
      • Set Count = 0
      • Set distance = 128.00
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Count = (Count + 1)
          • Set TempPoint[Count] = ((Position of FirelordIfrit) offset by (140.00 + distance) towards (Facing of FirelordIfrit) degrees)
          • Unit - Order FlameStrikeArray[Count] to Human Blood Mage - Flame Strike TempPoint[Count]
          • Set distance = (distance + 128.00)
      • Set Count = 0
      • Wait 1.10 seconds
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set Count = (Count + 1)
          • Unit - Remove Flame Strike from FlameStrikeArray[Count]
          • Unit - Remove FlameStrikeArray[Count] from the game
          • Custom script: call RemoveLocation(udg_TempPoint[udg_Count])
      • Custom script: set udg_IfritsAbilities[3] = null
      • Unit - Set FirelordIfrit movement speed to (Default movement speed of FirelordIfrit)
      • Trigger - Turn off (This trigger)


Any help is appreciated :D
 

Curo

Why am I still playing this game...?
Reaction score
109
IfritsAbilities[1] Equal to Fire Wave <gen>: what kind of variable is this? I'd prefer to use a boolean variable to track if a unit is using an ability, which is what I think you are doing.
 

The_Reaping

Member
Reaction score
2
IfritsAbilities[1] Equal to Fire Wave <gen>: what kind of variable is this? I'd prefer to use a boolean variable to track if a unit is using an ability, which is what I think you are doing.

Yeah pretty much. Is that why it isn't working?
 

Curo

Why am I still playing this game...?
Reaction score
109
Yeah pretty much. Is that why it isn't working?

I can't say for sure, since you are using JASS lines for referring to that variable, and I'm not good at de-bugging JASS. If you change the references to GUI, then we can talk. I'll keep looking at your triggers though.
 

The_Reaping

Member
Reaction score
2
I can't say for sure, since you are using JASS lines for referring to that variable, and I'm not good at de-bugging JASS. If you change the references to GUI, then we can talk. I'll keep looking at your triggers though.

Changing it to a boolean worked. Thanks :D
 

The_Reaping

Member
Reaction score
2
Okay, having trouble with 2 more triggers :/ It crashes whenever they run. I can't seem to work out why either :S

Run Destruction

Trigger:
  • Run Destruction
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Overdrive Less than 900
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Overdrive Greater than or equal to 900
            • Then - Actions
              • Set Overdrive = 900
              • Trigger - Run Run Destruction &lt;gen&gt; (ignoring conditions)
              • Trigger - Turn off Change Overdrive &lt;gen&gt;
              • Trigger - Turn off Run Fire Wave &lt;gen&gt;
              • Trigger - Turn off Run Flame Crash &lt;gen&gt;
              • Trigger - Turn off Run Flame Strike &lt;gen&gt;
              • Trigger - Turn off Run Spawned Ifrits &lt;gen&gt;
            • Else - Actions


Destruction

Trigger:
  • Destruction
    • Events
    • Conditions
    • Actions
      • Unit - Make FirelordIfrit Invulnerable
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Random point in Boss Overdrive Area &lt;gen&gt;)
          • Unit - Move FirelordIfrit instantly to TempPoint
          • Animation - Play FirelordIfrit&#039;s birth animation
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Wait 0.45 seconds
      • Unit - Move FirelordIfrit instantly to (Center of Boss Spawn Area &lt;gen&gt;)
      • Set distance = 300.00
      • Set spawnOffset = 0
      • For each (Integer Count) from 1 to 36, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Count Equal to 6
            • Then - Actions
              • Set distance = 600.00
              • Set spawnOffset = (spawnOffset + 30)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Count Equal to 18
                • Then - Actions
                  • Set distance = 900.00
                  • Set spawnOffset = (spawnOffset + 20)
                • Else - Actions
                  • Set spawnOffset = (spawnOffset + 60)
          • Unit - Create 1 Spell Dummy for (Owner of FirelordIfrit) at ((Position of FirelordIfrit) offset by distance towards (0.00 + (Real(spawnOffset))) degrees) facing Default building facing degrees
          • Set DestructionArray[Count] = (Last created unit)
          • Unit - Add Kaboom! (Clockwerk Goblin-Level 1) to DestructionArray[Count]
      • For each (Integer Count) from 1 to 36, do (Actions)
        • Loop - Actions
          • Unit - Order DestructionArray[Count] to Neutral - Kaboom! (Position of DestructionArray[Count])
          • Wait 0.25 seconds
          • Unit - Remove Kaboom! (Clockwerk Goblin-Level 1) from DestructionArray[Count]
          • Unit - Remove DestructionArray[Count] from the game
      • Unit - Make FirelordIfrit Vulnerable
      • Trigger - Turn on Run Fire Wave &lt;gen&gt;
      • Trigger - Turn on Run Flame Crash &lt;gen&gt;
      • Trigger - Turn on Run Flame Strike &lt;gen&gt;
      • Trigger - Turn on Run Spawned Ifrits &lt;gen&gt;


EDIT: Figured out why. xD
 

The_Reaping

Member
Reaction score
2
Last error, hopefully, but for some reason one of my old spells has just completely stopped working. I've rewrote it like 5 times now but nothing is happening. :/ getting quite annoying now. Here's the triggers.

Run Fire Wave

Trigger:
  • Run Fire Wave
    • Events
      • Time - Every (Random real number between 4.00 and 7.00) seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FireWave Equal to True
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Trigger - Run Fire Wave &lt;gen&gt; (ignoring conditions)


Fire Wave

Trigger:
  • Fire Wave
    • Events
    • Conditions
    • Actions
      • Set FireWave = True
      • Set Target = Hero[(Random integer number between 1 and numOfPlayers)]
      • Unit - Create 1 Spell Dummy for (Owner of FirelordIfrit) at (Position of FirelordIfrit) facing (Facing of FirelordIfrit) degrees
      • Set Caster = (Last created unit)
      • Unit - Add Fire Wave to Caster
      • For each (Integer FireWaveInt) from 1 to 14, do (Actions)
        • Loop - Actions
          • Wait 0.25 seconds
          • Unit - Order Caster to Orc Tauren Chieftain - Shockwave (Position of Target)
      • Unit - Remove Fire Wave from Caster
      • Unit - Remove Caster from the game
      • Set FireWave = False
      • Trigger - Turn off (This trigger)


All help is appreciated. :D
 

HydraRancher

Truth begins in lies
Reaction score
197
Well firstly, the action Turn off (This trigger) is pointless because you have no event. Skip Remaining Actions is aswell because there are no remaining actions.

Maybe FireWave is automatically False, so the first trigger never runs.

You also don't need the boolean, because if you're waiting 3.50 seconds (14*0.25), and the max time for the periodic is 4.00 seconds, you're never going to get overlap.

Instead of removing the units I would add an expiration timer of about 4 seconds.

So I'd presume this trigger never runs, because the previous trigger never runs, because FireWave is always false.
 

The_Reaping

Member
Reaction score
2
Well firstly, the action Turn off (This trigger) is pointless because you have no event. Skip Remaining Actions is aswell because there are no remaining actions.

Maybe FireWave is automatically False, so the first trigger never runs.

You also don't need the boolean, because if you're waiting 3.50 seconds (14*0.25), and the max time for the periodic is 4.00 seconds, you're never going to get overlap.

Instead of removing the units I would add an expiration timer of about 4 seconds.

So I'd presume this trigger never runs, because the previous trigger never runs, because FireWave is always false.

This is what I changed the trigger to. But it still doesn't work. I even added a debugging line to see if it actually ran thr trigger. The trigger is run and the text appears but nothing else happens.. :/

Fire Wave

Trigger:
  • Fire Wave
    • Events
    • Conditions
    • Actions
      • Set Target = Hero[(Random integer number between 1 and numOfPlayers)]
      • Unit - Create 1 Spell Dummy for (Owner of FirelordIfrit) at (Position of FirelordIfrit) facing (Facing of FirelordIfrit) degrees
      • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Fire Wave to (Last created unit)
      • For each (Integer FireWaveInt) from 1 to 14, do (Actions)
        • Loop - Actions
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Position of Target)
          • Wait 0.25 seconds
      • Unit - Remove Fire Wave from (Last created unit)
      • Game - Display to (All players) the text: Fire Wave should ha...
      • Trigger - Turn off (This trigger)


Edit: Nevermind it started working o.o
 

Curo

Why am I still playing this game...?
Reaction score
109
Lol Reaping, you funny. I keep reading your triggers, thinking if I should try and find out what's wrong. But then I scroll down to the bottom of your post to find "nevermind, it works".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top