SpasMaster
Hosted Project: SC
- Joined
- Jan 29, 2010
- Messages
- 1,994
Hello, Hive!
I am working on a Castle Fight based project. (For those who are not familiar: Castle Fight is a game where you create buildings at your base which spawn mobs that automatically attack the enemy Castle. The idea is to overrun and outsmart your enemy with strategy. Units cannot be controlled.)
So I wanted to create this unit called Warlock. What it should do is:
1.) Get in melee range and cast its spell which does aoe damage.
2.) Move back a bit and hold position until the spell is ready to be cast again (CD is 12 secs)
3.) Return to its automatic path towards the enemy castle.
All of this should be done automatically since the player has no control over the unit. Alright, so I started working on this and I cannot make the whole thing MUI, so this is what I need help with. Here is how I proceeded with coding this, you can read step by step and follow the triggers:
1.) The Warlock has an auto-cast "Parasite" dummy which casts the AoE.
2.) Chamber of Darkness is a dummy spell which simply gives him a visual effect to let the player know he has the ability ready. When he casts the spell (1.), it gets removed.
3.) The If/Then/Else conditions order the Warlock to move back to his base for a bit, until ordered to hold position. The order (as you can see in the trigger) is not move, but is instead Serpent Ward based, because the move command is let's say... disabled in this map, to make the units uncontrollable.
4.) Next, after a 5,50 seconds wait (Non-MUI right there) he has to stop. He stops by casting that same Serpent Ward dummy spell. That same Serpent Ward spell summons an invisible dummy unit with expiration time of 6 seconds.
5.) Moving to second trigger. When the dummy unit expires, the Warlock is issued an order to once more attack-move to the enemy base and receives back his visual dummy ability - Chamber of Darkness to let the player know his spell is ready.
All of this may sound complex, so I'll try to sum up what I am trying to accomplish here.
-Warlock goes in melee range, casts his Parasite spell.
-He is ordered to move back for 5,5 seconds and then Hold Position.
-He stays like that for 6 more seconds.
-By that time his spell is recharged and he goes back against the enemy once more.
All of that should be MUI. Thanks in advance.
I am working on a Castle Fight based project. (For those who are not familiar: Castle Fight is a game where you create buildings at your base which spawn mobs that automatically attack the enemy Castle. The idea is to overrun and outsmart your enemy with strategy. Units cannot be controlled.)
So I wanted to create this unit called Warlock. What it should do is:
1.) Get in melee range and cast its spell which does aoe damage.
2.) Move back a bit and hold position until the spell is ready to be cast again (CD is 12 secs)
3.) Return to its automatic path towards the enemy castle.
All of this should be done automatically since the player has no control over the unit. Alright, so I started working on this and I cannot make the whole thing MUI, so this is what I need help with. Here is how I proceeded with coding this, you can read step by step and follow the triggers:
1.) The Warlock has an auto-cast "Parasite" dummy which casts the AoE.
2.) Chamber of Darkness is a dummy spell which simply gives him a visual effect to let the player know he has the ability ready. When he casts the spell (1.), it gets removed.
3.) The If/Then/Else conditions order the Warlock to move back to his base for a bit, until ordered to hold position. The order (as you can see in the trigger) is not move, but is instead Serpent Ward based, because the move command is let's say... disabled in this map, to make the units uncontrollable.
4.) Next, after a 5,50 seconds wait (Non-MUI right there) he has to stop. He stops by casting that same Serpent Ward dummy spell. That same Serpent Ward spell summons an invisible dummy unit with expiration time of 6 seconds.
5.) Moving to second trigger. When the dummy unit expires, the Warlock is issued an order to once more attack-move to the enemy base and receives back his visual dummy ability - Chamber of Darkness to let the player know his spell is ready.
[trigger=""]Chamber of Darkness
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Parasite (Warlock)
Actions
Set Warlock = (Triggering unit)
Unit - Remove Chamber of Darkness from (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Orc Shadow Hunter - Serpent Ward AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Orc Shadow Hunter - Serpent Ward AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Else - Actions
Wait 5.50 game-time seconds
Set WarlockStop_Point = (Position of (Triggering unit))
Unit - Order Warlock to Orc Shadow Hunter - Serpent Ward WarlockStop_Point
Custom script: call RemoveLocation (udg_WarlockStop_Point)
[/trigger]
[trigger=""]Chamber of Darkness 2
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Dummy (Warlock)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Move To AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Move To AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Else - Actions
Unit - Add Chamber of Darkness to (Triggering unit)
[/trigger]
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Parasite (Warlock)
Actions
Set Warlock = (Triggering unit)
Unit - Remove Chamber of Darkness from (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Orc Shadow Hunter - Serpent Ward AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Orc Shadow Hunter - Serpent Ward AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Else - Actions
Wait 5.50 game-time seconds
Set WarlockStop_Point = (Position of (Triggering unit))
Unit - Order Warlock to Orc Shadow Hunter - Serpent Ward WarlockStop_Point
Custom script: call RemoveLocation (udg_WarlockStop_Point)
[/trigger]
[trigger=""]Chamber of Darkness 2
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Dummy (Warlock)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Set AttackPoint_Red = (Center of Castle East <gen>)
Unit - Order (Triggering unit) to Move To AttackPoint_Red
Custom script: call RemoveLocation (udg_AttackPoint_Red)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 8 (Pink)
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
Then - Actions
Set AttackPoint_Green = (Center of Castle West <gen>)
Unit - Order (Triggering unit) to Move To AttackPoint_Green
Custom script: call RemoveLocation (udg_AttackPoint_Green)
Else - Actions
Unit - Add Chamber of Darkness to (Triggering unit)
[/trigger]
All of this may sound complex, so I'll try to sum up what I am trying to accomplish here.
-Warlock goes in melee range, casts his Parasite spell.
-He is ordered to move back for 5,5 seconds and then Hold Position.
-He stays like that for 6 more seconds.
-By that time his spell is recharged and he goes back against the enemy once more.
All of that should be MUI. Thanks in advance.