Im working on a spell called bowsers castle. When bowser uses "bowser castle" him and the targeted hero are suppose to transport to a seculded part of the map. I have the spell half working, so far the spell teleports bowser but leaves the targeted hero in place and is not teleported.
This is my code-
Thanks for taking a look!
This is my code-
Code:
Bowsers Castle
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Bowser's Castle
Actions
Set BowsersCastle = (Units of type Bowser Statue)
Unit Group - Pick every unit in BowsersCastle and do (Unit - Change ownership of (Picked unit) to (Owner of (Triggering unit)) and Change color)
Code:
Bowsers Castle 2
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Bowser's Castle
Actions
Wait 0.10 game-time seconds
Unit - Move (Targeted unit) instantly to (Center of BowsersCastle <gen>)
Unit - Move (Triggering unit) instantly to (Center of BowsersCastle <gen>)
Wait 5.00 game-time seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is an enemy of Player 7 (Green)) Equal to True
Then - Actions
Unit - Move (Targeted unit) instantly to (Center of HeroCreationScourge <gen>)
Unit - Move (Triggering unit) instantly to (Center of HeroCreationSentinel <gen>)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is an enemy of Player 1 (Red)) Equal to True
Then - Actions
Unit - Move (Targeted unit) instantly to (Center of HeroCreationSentinel <gen>)
Unit - Move (Triggering unit) instantly to (Center of HeroCreationScourge <gen>)
Else - Actions
Do nothing
Thanks for taking a look!