Help please!

leothepeo

New Member
Reaction score
0
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-

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!:)
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
It's because of the 0.10 second wait before the move action starts. "Targeted unit" doesn't carry over a wait, it simply refers to no unit after the waiting action. Can't you just give the spell a 0.10 second casting time to eliminate the wait? And also, set Targeted unit to a unit variable and refer that instead. It will stop the bugging.
 

SkateuUp

Member
Reaction score
4
if its only because targeted doesn't carry over waits use a variable?
edit: sry missed last part of his
 

Fire-Wolf

S.P.D Smoke Pot Daily, Legalize It!
Reaction score
54
Remove the wait, and change Triggering Unit, to Casting Unit.
EDIT: Change the event of the second trigger to Starts the effects of an ability. Because then you can have the cooldown without the wait. Always use that for most triggered spells. Sometimed its useful however, but in this case its not.
 

leothepeo

New Member
Reaction score
0
The caster already moves there its the target being casted on that does not move. And variable did not help. :(
 

leothepeo

New Member
Reaction score
0
I will try the Starts the effects of an ability but i dont think it will help :(

Fixed thanks for the help.
 

Fire-Wolf

S.P.D Smoke Pot Daily, Legalize It!
Reaction score
54
Its because remeber what everyone said. Targeted Unit doesn't wait over, so remove not just wait 0.10 also remove the Wait 5.00 If you hadn't.
 
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