Custom Script

Septimus

New Member
Reaction score
58
Code:
Assassination Hero Death
    Events
        Unit - A unit Dies
    Conditions
        ((Unit-type of (Triggering unit)) Equal to Commander) or ((Unit-type of (Triggering unit)) Equal to King)
    Actions
        Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player)) +  hero has dead. It would be revive in 3 minutes.)
        For each (Integer A) from 1 to 11, do (Actions)
            Loop - Actions
                Set Unit_Revive[(Integer A)] = (Triggering unit)
                Wait 180.00 seconds
                Set Revive_Point = (Position of Spartan Command Center 0023 <gen>)
                Hero - Instantly revive (Triggering unit) at Revive_Point, Show revival graphics
                Camera - Pan camera for (Owner of (Triggering unit)) to Revive_Point over 0.00 seconds
                Custom script:   call RemoveLocation(udg_Revive_Point)
                [COLOR="Red"]Custom script:   call (udg_)[/COLOR]

What is the code to destroy unit ? I forgot the code. :confused:
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
destroy unit? do you mean you wanna destroy a unit variable to clean leaks?

well unit variables do not leak, you havent got to remove them.
 

Diamondeye

New Member
Reaction score
10
The text should probably be (first action):
"(owner of unit)'s hero has died. It will be revived in three minutes."

Other than that, just do what Accname says :)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
no exept you want the unit to be removed. like the GUI action "remove unit".

you only need to remove following variables with GUI to avoid leaks:
-call DestroyGroup (udg_...)
-call RemoveLocation (udg_...)
-call RemoveRect (udg_...)
-call DestroyForce (udg_...)

for further information you could read a turtorial about memory leaks. Click!
 

Genyuumaru

New Member
Reaction score
15
It's Septimus, the maps moderator ^^

I set the variable = null, but that's for local variable units.
In your situation - No. You don't need to do anything with it. The variable is just a pointer to the unit.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
You null unit variables, doable in GUI.
Only null when you're done. This applies to globals, not just locals.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top