Spell problem..

unknown666

New Member
Reaction score
5
Hey,

I made a simple loading spell could anyone help me?

Trigger:
Trigger:
  • Events
    • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Load
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Targeted unit)) Equal to Player 1 (Red)
            • Then - Actions
              • Unit - Set (Casting unit) movement speed to 415.00
              • Unit - Add Engine ON to (Casting Unit)
              • Set HiddenHeroCar[1] = (Targeted Unit)
              • Unit - Hide HiddenHeroCar[1]
          • Else - Actions
            • Do nothing


Does anyone know why this doesn't work?

Kind Regards,

unknown666
 

Romek

Super Moderator
Reaction score
964
Probably because the "If Conditions" are empty.
So it'll always be false.
You can remove the If/Then/Else with the empty condition.
It's useless.
And you can put
Trigger:
  • (Owner of (Targeted unit)) Equal to Player 1 (Red)
into the 'main' conditions, to remove the second If/Then/Else.

Also, There's no point in ever using "Do nothing".
It does nothing anyway.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First change (Targeted Unit) to (Target unit of ability being cast), then also use (Triggering Unit) instead of (Casting Unit) since it's more stable.
That's all for now, let me know after you try
 

unknown666

New Member
Reaction score
5
Made the trigger shorter and now looks like:

Trigger:
  • Events
    • Unit - A unit start the effect of an ability
    • Conditions
    • Actions
      • If (All conditions are true) then do (Then Actions) or else (Else Actions)
      • If - Conditions
        • (Owner of (Targeted unit)) Equal to Player 1 (Red)
      • Then - Actions
        • Unit - Set (Triggering unit) movement speed to 415.00
        • Unit - Add Engine ON to (Triggering unit)
        • Set HiddenHeroCar[1] = (Targeted unit of Ability being cast)
        • Unit - Hide HiddenHeroCar[1]
      • Else - Actions
        • Do Nothing


I still get the Else - Actions as working actions...

EDIT::

OOps!! forgot to change

Trigger:
  • (Owner of (Targeted unit)) Equal to Player 1 (Red)


to

Trigger:
  • (Owner of (Targeted unit of ability being cast)) Equal to Player 1 (Red)


both +Rep and thank you for your time
 
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