• 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.

PLEASE HELP ME WITH THIS TRIGGER

Status
Not open for further replies.
Level 4
Joined
Feb 27, 2006
Messages
49
im making trigger when the unit is attcked it will spin and damage enemy units my problem is when my unit spins just once and damages the enemy units he suddenly dies


here is my trigger
Events
Unit - A unit Is attacked

Conditions
(Level of Deadly Spin for (Triggering unit)) Greater than 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to 25
Then - Actions
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Attacking unit))) and do (Actions)
Loop - Actions
Animation - Play (Attacked unit)'s attack walk stand spin animation
Unit - Cause (Attacked unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Attacked unit)), dealing 260.00 damage of attack type Chaos and damage type Normal
Else - Actions
Do nothing

please help me
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Pick every unit in 500 radius of (attacked unit) and If/Then/Else again.

If:
(Or): If (Picked Unit) is in (Units owned by (Owner of (Attacked Unit)))) Or ((Picked Unit) Not equal to (Attacked Unit))

Then:
Unit: Cause (Attacked Unit) to damage (Picked Unit), dealing 260.00 damage of attack type Chaos and damage type Normal.

Else:
Do Nothing.


I don't know if it's correct, I'm not very good at spell-making, but I guess it works.
 
Level 2
Joined
Aug 14, 2005
Messages
14
I am not an expert and never tried to do such thing, but maybe this will solve your problem...

Unit - A unit Is attacked

Conditions
(Level of Deadly Spin for (Triggering unit)) Greater than 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 100) Less than or equal to 25
Then - Actions



"""Unit Group - Pick every unit within 500 of position (of attacked unit) matching condition - boolean - unit belongs to (enemy of owner of attacked unit) and now do (Actions)"""



Loop - Actions
Animation - Play (Attacked unit)'s attack walk stand spin animation
Unit - Cause (Attacked unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Attacked unit)), dealing 260.00 damage of attack type Chaos and damage type Normal
Else - Actions
Do nothing
 
Status
Not open for further replies.
Top