• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Some simple trigger effects I need, won't waste much of your time

Status
Not open for further replies.
Level 2
Joined
May 19, 2009
Messages
16
Sorry for wasting your time, but I'm not really good at triggering. Anyway, these are very simple so it won't take much of your time. Thanks to those who will help!


1. Adding a custom effect when ability "Avatar(mountain king)" is used, then gets removed later when the avatar buff expires.
2. The custom effect and avatar stacks when spell "Bladestorm" is activated. (Orc Blademaster)

---------------------------------------------------------------------------
If you are interested in my map, just PM me if you want to help, it's a hero defense.
 
Level 10
Joined
Apr 13, 2005
Messages
630
  • Spell effect
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar
    • Actions
      • Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set AvatarEffect[(Player number of (Owner of (Constructing structure)))] = (Last created special effect)
      • Wait 30.00 seconds
      • Special Effect - Destroy AvatarEffect[(Player number of (Owner of (Casting unit)))]
This is pretty simple and MPI.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
PurplePoot mentioned that you should take into account if the unit is dead or went for a Resurrection and that Special Effect still plays on that unit

You should make a looping trigger that checks whether the unit is dead or not, once it's dead, immediately remove the SFX as it no longer needed

If you don't, the next revival of that unit (provided that the unit revives less than 30 seconds) will still have the SFX attached to the unit while the unit no longer on Avatar mode, you got that ?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
(Triggering player) calls 1 function as compared to (Owner of (Triggering unit)) which calls 2, therefore (Triggering player) is more efficient and it works, try it.
I'm pretty sure I've run into situations in the past where Triggering Player is not the same as (Owner of (Triggering Unit)) and the efficiency difference is irrelevant, so I'd advise writing it out in a way that makes sense given the event for safety reasons.

(It's also possible the event response was updated in one of the recent patches, not sure which)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
As you mentioned, (Triggering player) does not respond to this:
  • Unit - A unit enters (Playable map area)
But it responds very well with "A unit starts the effect of an ability"
So why not use that ?
Because people don't have infallible memories and the safest way to not cause pointless bugs is to not do inconsistent stuff like use Triggering Player for unit events.
 
Status
Not open for further replies.
Top