leak or no?

zyzfcs

New Member
Reaction score
5
Code:
creeps die in region 3
Events
    Unit - A unit owned by Player 12 (Brown) Dies
Conditions
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Unit-type of (Dying unit)) Equal to Quillboar
        Then - Actions
            Wait 120.00 seconds
            Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Random point in creep region 3 <gen>) facing Default building facing degrees
        Else - Actions
            Do nothing

i wasn't sure about this:
Code:
 Unit - Create 1 (Unit-type of (Dying unit)) for Player 12 (Brown) at (Random point in creep region 3 <gen>) facing Default building facing degrees

should i put "Quillboar" or "Dying unit" for that code?
 

Yoshii

New Member
Reaction score
74
any should be fine,however i would use quilboard unit type.
btw your trigger leak because you use a region"creep spawn3"

make a variable point and do
set variable=creep spawn 3
then do the create unit at position of variable instead of creep spawn 3.
 

zyzfcs

New Member
Reaction score
5
Yoshii said:
set variable=creep spawn 3
then do the create unit at position of variable instead of creep spawn 3.


i think trigger will be still running without setting variable well as long as i have creeps on that region? :nuts:
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
You question was about leaks right?

Yoshii is 100% percent right, if you want an non leaking version of that trigger you need a varaible.

Code:
creeps die in region 3
Events
    Unit - A unit owned by Player 12 (Brown) Dies
Conditions
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Unit-type of (Dying unit)) Equal to Quillboar
        Then - Actions
            Wait 120.00 seconds
            set Tpoint = (Random point in creep region 3 <gen>)
            Unit - Create 1 Quillboar for Player 12 (Brown) at Tpoint  facing Default building facing degrees
            Custom Script: call RemoveLocation(udg_Tpoint)
        Else - Actions


About the Quillboar thing, use Quillboar. Not Unit type of Dying unit.
First of all, after 120 seconds the unit has decayed and is removed from memory,
Second, if you know the unit type why use something else?
 

zyzfcs

New Member
Reaction score
5
Code:
Events
    Unit - A unit owned by Player 12 (Brown) Dies
Conditions
(Unit-type of (Dying unit)) Equal to Quillboar

Actions
             Wait 120.00 seconds
            set Tpoint = (Random point in creep region 3 <gen>)
            Unit - Create 1 Quillboar for Player 12 (Brown) at Tpoint  facing Default building facing degrees
            Custom Script: call RemoveLocation(udg_Tpoint)
        Else - Actions

what about this?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top