• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Leak Removal Masters - For You, This Is

Status
Not open for further replies.
Level 12
Joined
Aug 22, 2008
Messages
911
Greetings Empire,

A request, I have.
Please make the next couple of triggers leakless and comment about them... The idea is a portal spell.
  • Channel Portal
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Summon Portal
    • Actions
      • Set NumberOfCastedTimes = (NumberOfCastedTimes + 1)
      • Unit - Set the custom value of (Triggering unit) to NumberOfCastedTimes
      • Unit - Make (Triggering unit) face (Facing of (Triggering unit)) over 0.00 seconds
      • Set Point = ((Position of (Triggering unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees)
      • Destructible - Create a dead Shimmering Portal at Point facing ((Facing of (Triggering unit)) + 180.00) with scale 1.00 and variation 1
      • Custom script: call RemoveLocation(udg_Point)
      • Destructible - Resurrect (Last created destructible) with (Max life of (Last created destructible)) life and Show birth animation
      • Set Portal1[(Custom value of (Triggering unit))] = (Last created destructible)
      • Set Point = (Position of Portal1[(Custom value of (Triggering unit))])
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point)
      • Unit - Add a 14.00 second Force Of Nature expiration timer to (Last created unit)
      • Set PortalDummy1[(Custom value of (Triggering unit))] = (Last created unit)
      • Set Point = (Target point of ability being cast)
      • Destructible - Create a dead Shimmering Portal at Point facing (Facing of (Triggering unit)) with scale 1.00 and variation 1
      • Custom script: call RemoveLocation(udg_Point)
      • Destructible - Resurrect (Last created destructible) with (Max life of (Last created destructible)) life and Show birth animation
      • Set Portal2[(Custom value of (Triggering unit))] = (Last created destructible)
      • Set Point = (Position of Portal2[(Custom value of (Triggering unit))])
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Point)
      • Unit - Add a 14.00 second Force Of Nature expiration timer to (Last created unit)
      • Set PortalDummy2[(Custom value of (Triggering unit))] = (Last created unit)
      • Set uPos = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at uPos facing (Facing of (Triggering unit)) degrees
      • Custom script: call RemoveLocation(udg_uPos)
      • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Triggering unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Wait 8.20 seconds
      • If ((Walk to Portal <gen> is on) Equal to True) then do (Trigger - Run Walk to Portal <gen> (ignoring conditions)) else do (Do nothing)
      • Trigger - Turn on Walk to Portal <gen>
  • Walk to Portal
    • Events
    • Conditions
    • Actions
      • Unit - Turn collision for (Triggering unit) Off
      • Set Point = (Position of Portal1[(Custom value of (Triggering unit))])
      • Unit - Order (Triggering unit) to Move To Point
      • Custom script: call RemoveLocation(udg_Point)
      • Unit - Remove Channel buff from (Triggering unit)
      • Wait until ((Distance between (Position of (Triggering unit)) and (Position of Portal1[(Custom value of (Triggering unit))])) Less than or equal to 50.00), checking every 0.20 seconds
      • Set Point = ((Position of Portal2[(Custom value of (Triggering unit))]) offset by 100.00 towards ((Facing of (Triggering unit)) - 180.00) degrees)
      • Unit - Move (Triggering unit) instantly to Point
      • Custom script: call RemoveLocation(udg_Point)
      • Set Point = ((Position of (Triggering unit)) offset by 350.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Order (Triggering unit) to Move To Point
      • Custom script: call RemoveLocation(udg_Point)
      • Wait 1.00 seconds
      • Unit - Turn collision for (Triggering unit) On
      • Destructible - Kill Portal1[(Custom value of (Triggering unit))]
      • Destructible - Kill Portal2[(Custom value of (Triggering unit))]
      • Wait 3.00 seconds
      • Unit - Remove PortalDummy1[(Custom value of (Triggering unit))] from the game
      • Unit - Remove PortalDummy2[(Custom value of (Triggering unit))] from the game
      • Set NumberOfCastedTimes = (NumberOfCastedTimes - 1)
 
Last edited:
Level 12
Joined
Aug 22, 2008
Messages
911
The second trigger is initially enabled.
EDIT: Updated trigger, it's maybe leakproof but it doesn't work, the unit just stands at the position of the first portal. Please help!
 
Last edited:
Level 12
Joined
Aug 22, 2008
Messages
911
its becouse it refers to (Triggering unit) which there in none in that trigger

do you want this spell to be cast by all units or just maybe 1 per player?

The Triggering Unit trick works, I worked it myself. :)
The problem was that when the "Wait For" used the variables, it didn't work, but once I reset it to a non-variable system, it worked fine.
So this is solved... Or would be, if this were the triggers forum.
 
Level 10
Joined
Apr 13, 2005
Messages
630
it wouldnt happen to be this now would it be
Set Point = (Position of Portal1[(Custom value of (Triggering unit))])

also instead of the wait your using use ingame second since it faster. Also waits really arent that good cuz they can really mess up a trigger from wut i learned
 
Level 12
Joined
Aug 22, 2008
Messages
911
also instead of the wait your using use ingame second since it faster. Also waits really arent that good cuz they can really mess up a trigger from wut i learned

I learned that too, but here they are pretty much needed since the unit needs to channel the spell. And I need the precise duration, which I don't know in game seconds... Is it possible to convert real time to game time?
 
Level 10
Joined
Apr 13, 2005
Messages
630
im sure its possible just count the seconds the timer on the top goes. I beleive game is alot faster because of the setting u put the timer to be. Mess around with the clock setting somewhere in the game.

Basicly all im saying is you could match real second with warcraft second only diff is day n night happen the same time as it does for us
 
Status
Not open for further replies.
Top