spell problem

velnias

New Member
Reaction score
13
my spell does not work correctly. here the triggers:

Code:
ice
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ice 
    Actions
        Set target = (Target unit of ability being cast)
        Unit - Set the custom value of target to 1
        Special Effect - Create a special effect attached to the origin of target using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
        Unit - Cause (Triggering unit) to damage target, dealing (Mana of (Triggering unit)) damage of attack type Spells and damage type Cold
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (target has buff Ice ) Equal to False
            Then - Actions
                Set ms = ((Current movement speed of target) x 0.50)
                Unit - Set target movement speed to ms
            Else - Actions

Code:
magecheck
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (Custom value of target) Equal to 1
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (target has buff Ice ) Equal to False
            Then - Actions
                Set ms = ((Current movement speed of target) / 0.50)
                Unit - Set target movement speed to ms
                Unit - Set the custom value of target to 0
            Else - Actions

i have based this spell on "Faerie Fire" ability because i need always use autocast. Now my spell work good only for 1 target, but if i use this spell more than one time before buff does not expires spell get crashed it return movement speed back only the for the last unit on whose i used spell.
how can i fix this problem ?

thanks

sry for bad english
 

THE_X

New Member
Reaction score
49
because your setting the target to the last unit you casted the spell on so you can cast your spell on a unit then it will set Target to that unit, and if you cast it on a diffrent unit then it will set that unit to Target and your 1 second trigger is effecting Target so the previouse target is not even being effected,

what i sugest is that you put the target into a unit group then every 1 seconds check if all units in that group have a buff, (the ice buff) and if not then set the movement back and remove them from that unit group
 
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