• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] spell trigger

Status
Not open for further replies.
Level 3
Joined
May 23, 2009
Messages
30
One of my heroes has an ability called c4 tag, once placed on the enemy by the ability, after 30 seconds it deals damge to the enemy. At the moment the only thing that i found actually worked was

Unit is attacked

Attacked unit has buff c4tag

after 30 seconds deal 300dmg to attacked unit.

for some reason the trigger wont work if i set it like this

Unit cast ability

ability equal to c4 tag

deal dmg

Is there any reason for this or a way i can set it as the first trigger using a unit is attacked , means that every time that unit is attacked it plays the trigger?
 
Level 10
Joined
Jul 22, 2007
Messages
261
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Critical Strike
    • Actions
      • Set C4tagUser = (Triggering unit)
      • Set C4tagTarget = (Target unit of ability being cast)
      • Countdown Timer - Start C4tag as a One-shot timer that will expire in 30.00 seconds
  • C4Tag Timmer Up
    • Events
      • Time - C4tag expires
    • Conditions
    • Actions
      • Unit - Cause C4tagUser to damage C4tagTarget, dealing 300.00 damage of attack type Chaos and damage type Normal
REPLACE CRITICAL STRIKE WITH C4tag*

Somthing like this?
P.S there is a trigger paster command in Advanced Post Options :wink:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You have used a wait, obviously.
The "attacked unit" is only valid if you do not use waits.

Use a variable instead, set the variable to the attacked unit and after that, deal damage to the set variable.

IMPORTANT TIP:

Go to the trigger editor
Left click on your trigger
Then, above "Events", you see the name of your trigger (or you should see it).
Right click that, select "Copy as Text", then paste it in your post (the first post) and wrap
  • tags around it.
  • That makes it a lot easier for everyone to understand...
  • [b]Edit:[/b]
  • And before any smartass comes telling you that the event is crappy and a wait-action sucks:
  • [list]
  • [*]I doubt "Unit Is Attacked" can be abused in a tag-game, but if you use it for a passive ability: never use "unit is attacked".
  • [*]Wait actions are accurate to 0.10 seconds, so what if the unit gets damage after 30.1 seconds? If you want it to be more accurate, use 29.5, though (it will become 30.0 very often).
  • [/list]
 
Level 3
Joined
May 23, 2009
Messages
30
Thanks for the help both of you, i used splashy's code and it works, now all i have to do is find a way round to making the second trigger spell, the spell if it hits people with the buff will remove the buff but deal the damage instantly,will i have to also add a trigger that tells the game to stop the c4tagcode, otherwise even if the buff is not there, wont it still do the damage after 30 secs aswell?
 
Status
Not open for further replies.
Top