- Joined
- Sep 3, 2006
- Messages
- 1,738
Okay, I know you'll all be like "Use a dummy caster and make an illusion blah blah blah" but this way is much nicer and cleaner and works a ton better.
Basically, I'm making a spell like Juxtapose, but instead of it being every time you attack, it's every time you're attacked. Then after it creates the copy, it moves it to the unit who attacked you and it will attack that unit. I can do this all just fine and easy, but when it comes to removing it...If it spawns 2 at the same time, they won't remove. Here's what I got:
Basically, I'm making a spell like Juxtapose, but instead of it being every time you attack, it's every time you're attacked. Then after it creates the copy, it moves it to the unit who attacked you and it will attack that unit. I can do this all just fine and easy, but when it comes to removing it...If it spawns 2 at the same time, they won't remove. Here's what I got:
-
Moonlight
-
Events
- Unit - A unit Is attacked
-
Conditions
- ((Attacked unit) has buff Moonlight) Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Moonlight (C) for (Attacked unit)) Equal to 1
- (Random integer number between 1 and 100) Equal to 5
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Unit - Create 1 Klypto Dummy for (Owner of (Attacked unit)) at (Position of (Attacking unit)) facing Default building facing degrees
- Animation - Play (Last created unit)'s attack animation
- Unit - Cause (Last created unit) to damage (Attacking unit), dealing 50.00 damage of attack type Chaos and damage type Normal
- Wait 1.00 game-time seconds
- Unit - Remove (Last created unit) from the game
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Moonlight (C) for (Attacked unit)) Equal to 2
- (Random integer number between 1 and 50) Equal to 5
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Unit - Create 1 Klypto Dummy for (Owner of (Attacked unit)) at (Position of (Attacking unit)) facing Default building facing degrees
- Animation - Play (Last created unit)'s attack animation
- Unit - Cause (Last created unit) to damage (Attacking unit), dealing 100.00 damage of attack type Chaos and damage type Normal
- Wait 1.00 game-time seconds
- Unit - Remove (Last created unit) from the game
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Moonlight (C) for (Attacked unit)) Equal to 3
- (Random integer number between 1 and 25) Equal to 5
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Unit - Create 1 Klypto Dummy for (Owner of (Attacked unit)) at (Position of (Attacking unit)) facing Default building facing degrees
- Animation - Play (Last created unit)'s attack animation
- Unit - Cause (Last created unit) to damage (Attacking unit), dealing 150.00 damage of attack type Chaos and damage type Normal
- Wait 1.00 game-time seconds
- Unit - Remove (Last created unit) from the game
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events