Simple trigger, need help...

xkid4ditya

New Member
Reaction score
13
Hi, there! I need your help about using duration with trigger..
a simple spell/skill i guess, add few skill to triggering unit when a spell is triggerd.

was i use this trigger.
Trigger:
  • Tes Skill
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tes Skill
    • Actions
      • Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
      • Set TS_Effect = (Last created special effect)
      • Unit - Add Tes Skill (atk) to (Triggering unit)
      • Unit - Add Tes Skill (def) to (Triggering unit)
      • Unit - Add Tes Skill (HP) to (Triggering unit)
      • Unit - Add Tes Skill (stats) to (Triggering unit)
      • Wait 60.00 seconds
      • Unit - Remove Tes Skill (atk) from (Triggering unit)
      • Unit - Remove Tes Skill (def) from (Triggering unit)
      • Unit - Remove Tes Skill (HP) from (Triggering unit)
      • Unit - Remove Tes Skill (stats) from (Triggering unit)
      • Special Effect - Destroy TS_Effect

60 sec wait is the duration and Tes Skill (atk, def, HP and stats) is item ability, this trigger work well BUT i need something different (without using wait).

and now i use this trigger.
Trigger 1 INITIAL ON
Trigger:
  • Tes Skill
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tes Skill
    • Actions
      • Set TS_Duration = 60
      • Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
      • Set TS_Effect = (Last created special effect)
      • Unit - Add Tes Skill (atk) to (Triggering unit)
      • Unit - Add Tes Skill (def) to (Triggering unit)
      • Unit - Add Tes Skill (HP) to (Triggering unit)
      • Unit - Add Tes Skill (stats) to (Triggering unit)
      • Trigger - Turn on Tes Skill Duration <gen>

Trigger 2 INITIAL OFF
Trigger:
  • Tes Skill Duration
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TS_Duration = (TS_Duration - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TS_Duration Less than or equal to 0
        • Then - Actions
          • Unit - Remove Tes Skill (atk) from (Triggering unit)
          • Unit - Remove Tes Skill (def) from (Triggering unit)
          • Unit - Remove Tes Skill (HP) from (Triggering unit)
          • Unit - Remove Tes Skill (stats) from (Triggering unit)
          • Special Effect - Destroy TS_Effect
          • Trigger - Turn off (This trigger)
        • Else - Actions


The trigger work well, but the problem is when the duration runout (which is 60 sec). It not remove the additional skill, is there any solution.?:) Thank's for you guys who can help me;)

My apologize for my spelling:eek:
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
There is no triggering unit in the second trigger. Set it to a variable and use it.
 

Napenthe

New Member
Reaction score
2
Set the triggering unit to a variable in the first trigger and call that variable in the second trigger (instead of triggering unit). Or course, you'll run into issues if multiple units use the ability within 60 sec of eachother... but it should work if it's only one hero
 

xkid4ditya

New Member
Reaction score
13
I did try this, just like you guys say.
Trigger:
  • Set TS_Unit = (Triggering unit)

on both trigger, i put that to the top of the action. But still not work, maybe i put the variable in wrong place.?:D correct me if i wrong:D
 

0WN3D

New Member
Reaction score
15
Tes Skill
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
    • (Ability being cast) Equal to Tes Skill
    • Actions
    • Set TS_Duration = 60
    • Set TesCaster = Casting unit
    • Special Effect - Create a special effect attached to the weapon,right of (Triggering unit) using Abilities\Weapons\ZigguratFrostMissile\ZigguratFrostMissile.mdl
    • Set TS_Effect = (Last created special effect)
    • Unit - Add Tes Skill (atk) to (Triggering unit)
    • Unit - Add Tes Skill (def) to (Triggering unit)
    • Unit - Add Tes Skill (HP) to (Triggering unit)
    • Unit - Add Tes Skill (stats) to (Triggering unit)
    • Trigger - Turn on Tes Skill Duration <gen>


Trigger 2 INITIAL OFF

Trigger:
  • Tes Skill Duration
    • Events
    • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
    • Set TS_Duration = (TS_Duration - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • TS_Duration Less than or equal to 0
    • Then - Actions
    • Unit - Remove Tes Skill (atk) from TesCaster
    • Unit - Remove Tes Skill (def) from TesCaster
    • Unit - Remove Tes Skill (HP) from TesCaster
    • Unit - Remove Tes Skill (stats) from TesCaster
    • Special Effect - Destroy TS_Effect
    • Trigger - Turn off (This trigger)
    • Else - Actions


Looks like you have misinterpreted what the above post said... Jus do as above...
 

xkid4ditya

New Member
Reaction score
13
Ha. ha. ha. ha... yes yes, i forgot changing the triggering unit to the variable, i guess im really missinterpreted them. The problem solved!:thup:
Thank's..................:D
 
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