• 🏆 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!

[Trigger] Special Effect Deletion Issue

Status
Not open for further replies.
Level 5
Joined
Jun 5, 2007
Messages
99
Hello Hive! Today I finally began the actual trigger work to one of my newer projects, so I decided to start out with the Chamber of Titans. At first, the chamber is off-limits, so there are a few guards at the door. Once you walk in, the guards look at you and you get ported out.

When you get ported out, a special effect appears on you for a few seconds. However if multiple units enter the region to get ported out before the special effect wares off, the new effect is deleted, but the older one is not.

Variable:
FountIntruderPortEffect
Special Effect
[ ] Array
None

  • Port
    • Events
      • Unit - A unit enters FountPort1 <gen>
      • Unit - A unit enters FountPort2 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Unit Group - Pick every unit in PortDoorGuards and do (Unit - Make (Picked unit) face (Triggering unit) over 0.00 seconds)
      • Unit Group - Pick every unit in PortDoorGuards and do (Animation - Play (Picked unit)'s Spell animation)
      • Special Effect - Create a special effect attached to the foot of (Triggering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Set FountIntruderPortEffect = (Last created special effect)
      • Wait 1.32 seconds
      • Unit - Move (Triggering unit) instantly to (Center of FountPortLocation <gen>)
      • Special Effect - Destroy FountIntruderPortEffect
      • Unit Group - Pick every unit in (Units in GROUP FountDoorguards <gen>) and do (Unit - Make (Picked unit) face 280.00 over 0.00 seconds)
      • Unit - Make Fount Guardian 0017 <gen> face 26.00 over 0.00 seconds
      • Unit - Make Fount Guardian 0018 <gen> face 200.00 over 0.00 seconds
      • Trigger - Turn on (This trigger)
      • Trigger - Turn on PortWarning2 <gen>
      • Trigger - Turn on PortWarning1 <gen>
I did do some searching, but I found hardly any results about Special Effects in general. If I happened to miss a solution to this, my apologies.

If anyone could point me in the right direction for this one, I would greatly appreciate it! :grin:
 
Level 8
Joined
Aug 3, 2008
Messages
391
lols you need jass. If you can't, then mis your GUI trigger with a few leak removal custom scripts.

At the start of the trigger, maybe add a custom script something like
"local effect udg_FountIntruderPortEffect"
then at the end of your trigger add a custom script like
"call DestroyEffect(udg_FountIntruderPortEffect"
and another one to top it off.
"set udg_FountIntruderPortEffect = null"
all the custom scripts without the quotation of course. If I doesn't work, well sorry. I don't usually mix GUI with Jass.
 
Level 11
Joined
Dec 31, 2007
Messages
780
human mass teleport doesnt last for an small amount of time? if so (and it fits your needs) you can destroy it right after creating it

  • Special Effect - Create a special effect attached to the foot of (Triggering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
  • Special Effect - Destroy Last created special effect
btw... there is no need to turn on your trigger if it is not turned off via trigger
 
Level 5
Joined
Jun 5, 2007
Messages
99
Yeah, I origionally had it turn itself off at the start, then I realized that wasn't such a good idea.

I'll try messing around with it a bit more.

EDIT: Destroying the special effect instantly works great! All I needed to do was re-time everything, which was a very easy step.

I clicked the egg!
 
Level 11
Joined
Dec 31, 2007
Messages
780
Btw... this leaks
  • Unit - Move (Triggering unit) instantly to (Center of FountPortLocation <gen>)
if you dont know what a leak is read This

a gross solution would be to change the SFX for a unit with that model adding the unit an expiration timer ... but that wouldnt be nice
 
Status
Not open for further replies.
Top