Problem with spell that only works with another spell

dudeim

New Member
Reaction score
22
Heej all,

I got 2 spells one a plain and simple windwalk that lasts forever until you attack etc..
the other spell is a spell based of storm bolt with a .5 sec duration.
The spells are meant to combine so if you use the windwalk you'll get the other spell "sinister strike". That works.. but then when you use Sinister Strike it deals 4 times your agi in dmg, but you need the buff of wind walk to deal the damage (cus else you can use it without the buff). And that exactly where it stops working the buff dissepears before the trigger comes with the checking of the buff part.
Trigger giving the Sinister Strike to unit when Wind walk (Walk of the Shadows) is used
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
    • (Ability being cast) Equal to Walk of the Shadows
    • Actions
    • Unit - Add Sinister Strike to (Triggering unit)

the damag trigger
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Condtions
    • (Ability being cast) Equal to Sinister Strike
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Triggering unit) has buff Walk of the Shadows) Equal to True
      • Then - Actions
        • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (4.00 x (Real((Agility of (Triggering unit) (Include bonuses))))) damage of attack type Spells and damage type Unknown
        • Quest - Display to (All players) the Quest Update message: yep
        • Unit - Remove (Ability being cast) from (Triggering unit)
      • Else - Actions
        • Quest - Display to (All players) the Quest Update message: nop
        • Unit - Remove (Ability being cast) from (Triggering unit)

The messages are there for testing and it always says "nop" cus the buff is dispeld before the trigger fires:(
So what could I do to fix it?

Thnx
Rep +:thup:
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Check for the buf in the conditions and not in the if then else
 

dudeim

New Member
Reaction score
22
That also doesn't work the trigger began that way
Edit: is there any way i can detect if wind walk is stopped (when the hero cast a spell or attacks a unit when he is in wind walk is that possible?) that way i could probably fix the trigger to
 

vypur85

Hibernate
Reaction score
803
Why would you need to check for the buff when the second ability is only available when you cast Windwalk?

Code:
Events
 Unit - A unit Starts the effect of an ability
Condtions
 (Ability being cast) Equal to Sinister Strike 
Actions
 Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (4.00 x (Real((Agility of (Triggering unit) (Include bonuses))))) damage of attack type Spells and damage type Unknown
 Unit - Remove (Ability being cast) from (Triggering unit)
 

dudeim

New Member
Reaction score
22
Well cus if you attack you break wind walk but i can't seem to find a way to remove the abillity then... so if i could find a solution to that it would also help. Didn't think about it earlier
 

vypur85

Hibernate
Reaction score
803
Then your real problem would be to remove the ability whenever the buff is gone.

Not sure if this works as you want:
Code:
Event
 A unit is attacked
Condition
 Level of Sinister Strike for (Attacking unit) Greater than 0
Actions
 Unit - Remove Sinister Strike from (Attacking unit)

Code:
Event
 A unit dies
Condition
 Level of Sinister Strike for (Triggering unit) Greater than 0
Actions
 Unit - Remove Sinister Strike from (Triggering unit)

Generally, if the unit has the Sinister Strike ability, this means the unit is in Windwalk and it can't attack because if it does, it will break Windwalk. So just check if the unit has the Sinister Strike ability or not (which is only available upon casting of Windwalk), and remove it if the unit attacks. Same goes for the dead trigger.
 

Galdiuz

Creator of Photon Command
Reaction score
98
That should be attacking/killing unit, not triggering unit, or else it won't work.
 

dudeim

New Member
Reaction score
22
Why didn't I think of that:p well thanx man just some simple adjustment to make it fit in my map and it works properly:D rep+:thup:

@Galdiuz
nop he makes it if the Hero that has Sinister Strike dies that the skill is removed :p
 

mr-death

Acolyte
Reaction score
51
My suggestions; use a dummy unit to add another buff when the unit goes windwalking.

change the condition to 'that buff' instead of walk of shadows.
and, remove 'that buff' right before you say 'yep' or 'nop'.
 
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