Triggers Issue

keeper77

New Member
Reaction score
3
Well, here are the triggers with which I am having a problem:

Trigger:
  • EarthShaker
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Life of (Attacked unit)) Less than or equal to 95000.00
      • (Unit-type of (Attacked unit)) Equal to "The Earthshaker"
    • Actions
      • Unit - Order (Attacked unit) to Night Elf Mountain Giant - Taunt


Trigger:
  • EarthShaker part 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taunt (earthshaker)
    • Actions
      • Unit - Add War Stomp (earthshaker) to (Triggering unit)
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
      • Wait 1.10 seconds
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
      • Wait 1.10 seconds
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
      • Wait 1.10 seconds
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
      • Wait 1.10 seconds
      • Unit - Order (Triggering unit) to Orc Tauren Chieftain - War Stomp
      • Unit - Remove War Stomp (earthshaker) from (Triggering unit)


The main idea behind the trigger, is that every so often, the hero casts taunt (must be below some hp), which draws enemies in, and then casts war stomp, 5 times, in a row. However, the problem is that war stomp only fires once, while it should fire 5 times. Note: Unit already has taunt, and doesn't already have war stomp (from the start). Thanks for your help :D
 

Laiev

Hey Listen!!
Reaction score
188
try to remove cooldown of stomp? lol...

sorry but your trigger is ugly :thdown:
 

keeper77

New Member
Reaction score
3
Ya it is ugly, btw the cooldown on stomp is below the wait time, so anyway to make my trigger "pretty."
 

ZugZugZealot

New Member
Reaction score
33
Create a dummy at the unit's location, have it do war stomp, and for each stomp after that, reset the dummy's cooldowns, move to unit position, and cast stomp.

You should do some research up on "Dummy units", you'll find they're a key ingredient for custom abilities.
 

Laiev

Hey Listen!!
Reaction score
188
well...

if you order a unit to cast a thing... so you CAN'T touch the unit... if you order to attack, the order will cnacel (not 100% about it, because stomp is instantly cast)

what you can do...

what you can do? hmm...

Trigger:
  • EarthShaker part 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taunt (earthshaker)
    • Actions
      • Set Caster = (Triggering unit)
      • Set TempPoint = (Position of Caster)
      • Trigger - Turn on EarthShaker part 3 <gen>



Trigger:
  • EarthShaker part 3
    • Events
      • Timer - Every 1,10 second time
    • Conditions
    • Actions
      • Set TempInteger = (TempInteger + 1)
      • Unit - Create 1 dummy at TempPoint to Caster facing any...
      • Unit - Add War Stomp (earthshaker) to (Last created unit)
      • Unit - Add 0,50 generic second time to (Last created unit) <something like this)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
      • If
        • TempInteger greater then 5
      • Then
        • Trigger - Turn off (This trigger)
      • Else


this ins't mui or mpi :x just to say...
 

Laiev

Hey Listen!!
Reaction score
188
oh... you're right :rolleyes: i foget that

just add
Trigger:
  • Custom Script: call RemoveLocation (udg_TempPoint)
when you turn off the trigger :p

sorry about that :rolleyes:
 

keeper77

New Member
Reaction score
3
Its ok, thanks for your help (I have one problem, my unit who is casting the stomp (not the dummy, the actual unit,) is being spawned over and over, but I think its prolly due to another trigger). Thanks for helping :D
 

keeper77

New Member
Reaction score
3
Well, when after I use the spell for the first time, about 30 seconds later (which is the same timer as respawn for neutral hostile (!), the unit is then created, 5 more times (same as stomp count). Here is the creep respawn trigger (not created by me), so see if anything is causing this.

Trigger:
  • INIT Store Creeps
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Loop = 0
      • Set NeutralGroup = (Units owned by Neutral Hostile)
      • Unit Group - Pick every unit in NeutralGroup and do (Actions)
        • Loop - Actions
          • Set Creep_Type[Loop] = (Unit-type of (Picked unit))
          • Set Creep_Position[Loop] = (Position of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to Loop
          • Set Loop = (Loop + 1)
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Destructible - Open All walls of (Picked destructible)
      • Custom script: call DestroyGroup (udg_NeutralGroup)


JASS:
function Trig_Revive_Creeps_Actions takes nothing returns nothing
    local integer CUSTOM
    set CUSTOM = GetUnitUserData(GetDyingUnit())
    call TriggerSleepAction( 30.00 )
    call CreateNUnitsAtLoc( 1, udg_Creep_Type[CUSTOM], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_Creep_Position[CUSTOM], bj_UNIT_FACING )
    call SetUnitUserData( GetLastCreatedUnit(), CUSTOM )
endfunction

//===========================================================================
function InitTrig_Revive_Creeps takes nothing returns nothing
    set gg_trg_Revive_Creeps = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Revive_Creeps, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Revive_Creeps, function Trig_Revive_Creeps_Actions )
endfunction


edit: might as well add the current trigger used

Trigger:
  • EarthShaker
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Life of (Attacked unit)) Less than or equal to 95000.00
      • (Unit-type of (Attacked unit)) Equal to "The Earthshaker"
    • Actions
      • Unit - Order (Attacked unit) to Night Elf Mountain Giant - Taunt


Trigger:
  • EarthShaker part 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taunt (earthshaker)
    • Actions
      • Set Caster = (Triggering unit)
      • Set TempPoint = (Position of Caster)
      • Trigger - Turn on EarthShaker part 3 <gen>


Trigger:
  • EarthShaker part 3
    • Events
      • Time - Every 1.10 seconds of game time
    • Conditions
    • Actions
      • Set TempInteger = (TempInteger + 1)
      • Unit - Create 1 DummyCaster (Custom Campaign) for Neutral Hostile at TempPoint facing Default building facing degrees
      • Unit - Add War Stomp (earthshaker) to (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Orc\EarthQuake\EarthQuakeTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInteger Greater than 5
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Custom script: call RemoveLocation (udg_TempPoint)
          • Set TempInteger = 0
        • Else - Actions
 

Laiev

Hey Listen!!
Reaction score
188
No...

just will cause respawn over time if you set the owner of unit to NEUTRAL..
 

keeper77

New Member
Reaction score
3
Hmm... well this is the only other trigger which runs on a 30 second cooldown *highly doubt that it is causing it (since non hero)*
Trigger:
  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = 30
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_Revive), true )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)


Also, check the triggers I made based off yours, I might have made an error there or etc. (added to post before this)
 

Laiev

Hey Listen!!
Reaction score
188
probably this:

Trigger:
  • Unit - Create 1 DummyCaster (Custom Campaign) for Neutral Hostile at TempPoint facing Default building facing degrees


to

Trigger:
  • Unit - Create 1 DummyCaster (Custom Campaign) for Caster at TempPoint facing Default building facing degrees
 

keeper77

New Member
Reaction score
3
Hmm... didn't fix the issue, HOWEVER, I isolated the part of the trigger causing the problem
Trigger:
  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)


Tested by removing it, and without this part, it doesn't respawn. Still need to find a way to fix this issue, however.
 

jig7c

Stop reading me...-statement
Reaction score
123
you need that part in your trigger!
or you could remove the unit after
Trigger:
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
 

keeper77

New Member
Reaction score
3
Worked like a charm (removing = no respawn), just had to add a wait delay to give the unit time to cast, thanks everyone
 

jig7c

Stop reading me...-statement
Reaction score
123
you just changed the generic timer from .50 to 1.0? just need more time to be alive i guess!
 

yuckyducky

New Member
Reaction score
2
Try this.

Trigger:
  • Is attacked
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Attacked unit) Equal to Earthshaker
          • (Life of Earthshaker) Less than or equal to 950000.00
        • Then - Actions
          • Unit - Order Earthshaker to Night Elf Mountain Giant - Taunt
          • Trigger - Run Stomp Start <gen> (checking conditions)
        • Else - Actions
          • Do nothing


Trigger:
  • Stomp Start
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start DurationTimer as a Repeating timer that will expire in 1.10 seconds
      • Countdown Timer - Start DurationTimer as a One-shot timer that will expire in 5.50 seconds

Trigger:
  • Stomping
    • Events
      • Time - RepeatingTimer expires
    • Conditions
    • Actions
      • Set A = (Position of Earthshaker)
      • Unit - Create 1 Dummy for (Owner of Earthshaker) at A facing 0.00 degrees
      • Unit - Add War Stomp to (Last created unit)
      • Unit - Add a 0.10 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
      • Custom script: call RemoveLocation(udg_A)


Trigger:
  • Stomp Stop
    • Events
      • Time - DurationTimer expires
    • Conditions
    • Actions
      • Countdown Timer - Pause RepeatingTimer
 

keeper77

New Member
Reaction score
3
Its alright, I found a trigger that works (just had to remove units), but thanks for your input.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top