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

[Trigger] SPAWN Vampire for Player 11 - leaks

Status
Not open for further replies.
Level 13
Joined
Mar 4, 2009
Messages
1,156
SPAWN Vampire for PLAYER 11
Events
Time - Elapsed game time is 54.50 seconds
Conditions
(Player 11 (Dark Green) slot status) Equal to Is playing
((Random unit from (Units owned by Player 11 (Dark Green) matching (((Matching unit) is A Hero) Equal to True))) is alive) Not equal to True
ACTIONS
Set FIXLAGS = (Center of VAMPIRES <gen>)
Unit - Create 1 units[(Random integer number between 1 and 6)] for Player 11 (Dark Green) at (Center of VAMPIRES <gen>) facing (Position of (Triggering unit))
Custom script: call RemoveLocation(udg_FIXLAGS)

is it good like this ?I hope it is...
 
Level 10
Joined
Jun 1, 2008
Messages
485
hmm, but i feel something wrong in this :

  • Conditions
    • ((Random unit from (Units owned by Player 11 (Dark Green) matching (((Matching unit) is A Hero) Equal to True))) is alive) Not equal to True
It check a random hero unit owned by Player 11 that not Alive, so if that player have more than 1 hero (one alive and one died), or don't have any hero, or it hero have removed from play, this trigger have a chance to not run.
and, is it possible to add condition to periodic trigger?

btw, your trigger now cause no leak. good.
 
Level 10
Joined
Jan 14, 2006
Messages
160
hmm, but i feel something wrong in this :


It check a random hero unit owned by Player 11 that not Alive, so if that player have more than 1 hero (one alive and one died), or don't have any hero, or it hero have removed from play, this trigger have a chance to not run.
and, is it possible to add condition to periodic trigger?

btw, your trigger now cause no leak. good.

You sure? I think [facing (Position of (Triggering unit))] leaks too.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
hmm, but i feel something wrong in this :


It check a random hero unit owned by Player 11 that not Alive, so if that player have more than 1 hero (one alive and one died), or don't have any hero, or it hero have removed from play, this trigger have a chance to not run.
and, is it possible to add condition to periodic trigger?

btw, your trigger now cause no leak. good.
im not shure is it possible to add condition but u can turn off that trigger and turn on another one with condition u want

((Random unit from (Units owned by Player 11 (Dark Green) matching (((Matching unit) is A Hero) Equal to True))) is alive) Not equal to True
this means that player 11 has no hero

{EDIT 1}
You sure? I think [facing (Position of (Triggering unit))] leaks too.

i think facing point dont leak becouse there is no variable type for faceing point

{EDIT 2}
Vampiric Strenght Upgrade
Events
Unit - A unit Finishes research
Conditions
(Researched tech-type) Equal to Vampiric Strength Upgrade
Actions
Hero - Create Tome of Strength +300 and give it to (Random unit from (Units owned by (Owner of (Researching unit)) matching (((Matching unit) is A Hero) Equal to True)))

does this trigger make leaks too?,or becouse "give it to" there will be no leaks?
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 10
Joined
Jun 1, 2008
Messages
485
i think facing point dont leak becouse there is no variable type for faceing point
but, point is leak. sorry, my bad, forgot to see all action, but it must be like this to remove leak:

  • ACTIONS
    • Set FIXLAGS = (Center of VAMPIRES <gen>)
    • Unit - Create 1 units[(Random integer number between 1 and 6)] for Player 11 (Dark Green) at FIXLAGS facing Default Facing Building (270)
    • Custom script: call RemoveLocation(udg_FIXLAGS)
and to all your 3 trigger above is not cause leak.
does this trigger make leaks too?,or because "give it to" there will be no leaks?
no, "give it to" action not affect leak, only Special Effect, Point, Unit Group and Dummy Unit are cause leak.
[thread=35124]See this tutorial to know it.[/thread]

P.S: Don't triple post!
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
  • ACTIONS
    • Set FIXLAGS = (Center of VAMPIRES <gen>)
    • Unit - Create 1 units[(Random integer number between 1 and 6)] for Player 11 (Dark Green) at FIXLAGS facing Default Facing Building (270)
    • Custom script: call RemoveLocation(udg_FIXLAGS)
thx i put at FIXLAGS it is good now

Does any of this facing leaks?:confused:
facing (Position of (Triggering unit))
facing Default building facing degrees
facing 270.00 degrees
 
Level 10
Joined
Jun 1, 2008
Messages
485
Does any of this facing leaks?:confused:
facing (Position of (Triggering unit))
This will make unit face location. And you must save it to a point variable and remove it because Location leak.
And, how can you set (Triggering Unit) when the event is "Time - Time Elapsed"? No unit are triggering it, so (Triggering Unit) is null.
facing Default building facing degrees
facing 270.00 degrees
This is same. Both will make unit facing down, like a building.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
If i put 3 actions that create units do i need 3 to do this 3 times or just once?
CallRemoveLocation(Udg_FIXLAGS)
CallRemoveLocation(Udg_FIXLAGS)
CallRemoveLocation(Udg_FIXLAGS)

AND WHY DO I SEE YOU ALL AS RUSSIANS?????????
 
Status
Not open for further replies.
Top