Trigger Help!

Bladezor

You can change this now in User CP.
Reaction score
0
Can I make a trigger that when a unit attack, Then it will creates 5 units around him. and after like 20 seconds then 5 unit will die/remove.
 

Ulla_t

Member
Reaction score
1
Sure, do you want a demo?

else

a unit is attack

Unit type of attacking unit equal to [Your Attacking Unit]

Set attackedUnitPosstion = Position of attacked unit.
Unit - Create 5 [SpawningUnit] for [Attacking Unit] at Postion of [attackedUnitPosstion] facing Attaked Unit.
Unit Order - Order last created unit to attack [Attaked unit]
Countdown timer - start [UnitDeathTimer] as a one-shot timer that exspires after 20 Seconds

UnitDeathTimer Exspires

Unit Group - Pick every unit in (Units of type (SpawningUnit)) and do (Action)
Loop - Action
Unit - Kill Picked unit.
 

Bladezor

You can change this now in User CP.
Reaction score
0
What is a demo? XD, if it is a map with all the triggers then I say yes. :)
 

Bladezor

You can change this now in User CP.
Reaction score
0
I fix it by my own =) But if I attack 2 timmes then it spawn 10 units, and they die att the same time. How should I fix that?

BTW thanks for the help. ^^
 

neckcuttabob

Member
Reaction score
3
Don't use 'Pick every unit in X and kill'

With "Unit - Create X [SpawningUnit] for [Attacking Unit] at Postion of [attackedUnitPosstion] facing Attaked Unit." only create 1 of them

Next line is going to be "Unit - Add a Xsecond Generic expiration timer to (last unit created)"

Then to make that happen 5 times just copy/paste the two things in the right order.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Then to make that happen 5 times just copy/paste the two things in the right order.
Copy-pasting will fill the trigger with the same actions.
Create the actions and move them into a For Each Integer loop.
 
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