- Joined
- Feb 27, 2007
- Messages
- 2,069
CAn some one post a spawn trigger that has NOT LEAKS! I cant find a place with a trigger like that,so if you post it i'd like it alot!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Spawning Trigger
Events:
<Events>
Conditions:
<Conditions>
Actions:
Unit - Create 1 Spiderling for <Spawning Player> at (Center of (Region 0001 gen)) facing Default building facing degrees
Set Spawned_Spiderling[1] = (Last Created Unit)
Unit - Order (Spawned_Spiderling[1]) to move to (Center of (Region 0002)) facing Default building facing degrees
Wait 1.50 Seconds
Unit - Create 1 Spiderling for <Spawning Player> at (Center of (Region 0001 gen)) facing Default building facing degrees
Set Spawned_Spiderling[2] = (Last Created Unit)
Unit - Order (Spawned_Spiderling[2]) to move to (Center of (Region 0002)) facing Default building facing degrees
Unit - Create 1 Spiderling for <Spawning Player> at (Center of (Region 0001 gen)) facing Default building facing degrees
Set Spawned_Spiderling[3] = (Last Created Unit)
Unit - Order (Spawned_Spiderling[3]) to move to (Center of (Region 0002)) facing Default building facing degrees
Unit - Create 1 Spiderling for <Spawning Player> at (Center of (Region 0001 gen)) facing Default building facing degrees
Set Spawned_Spiderling[4] = (Last Created Unit)
Unit - Order (Spawned_Spiderling[4]) to move to (Center of (Region 0002)) facing Default building facing degrees
Unit - Create 1 Spiderling for <Spawning Player> at (Center of (Region 0001 gen)) facing Default building facing degrees
Set Spawned_Spiderling[5] = (Last Created Unit)
Unit - Order (Spawned_Spiderling[5]) to move to (Center of (Region 0002)) facing Default building facing degrees
--etc.--
Spawning Trigger
Events:
Conditions:
Actions:
General - For each (IntegerA) from 1 to <Spawn Number> do (Actions)
)
Test Trigger
Events:
Conditions:
Actions:
Custom Script: call RemoveLocation( udg_<Insert Point Here> )

Test Trigger
Events:
Conditions:
Actions:
Set Loc[1] = (Center of (Region 001)
Unit - Create 1 blabalbalabla at Loc[1] for balbalablablaabla
Custom Script: call RemoveLocation( udg_Loc[1] )
Do not use the action : Unit - Create 1 <Unit> for <Player> at (Center of (Region 0001 gen)) facing Default building facing degrees , it will surely leak. Firstly, create a variable and use the action Set <your variable> = (Center of (Region 0001 gen)). Then, use the action : Unit - Create 1 <Unit> for <Player> at <your variable> facing Default building facing degrees. The overall trigger action should be:
Set <your variable> = (Center of (your region))
Unit - Create 1 <Unit> for <Player> at <your variable> facing Default building facing degrees
Custom Script: call RemoveLocation( udg_<your variable> )
Ohzz! I forgot that, sorry, I didn't fiddle around with regions in a while, I alwayz used points. Anywayz, that means you have to do this:
Sorry for the confusionz..
Test Trigger
Events:
Conditions:
Actions:
Set Loc[1] = (Center of (Region 001)
Unit - Create 1 blabalbalabla at Loc[1] for balbalablablaabla
Custom Script: call RemoveLocation( udg_Loc[1] )
Also, I don't think it is DestroyLocation, that might work, but I know that RemoveLocation works. I'm 110% sure. ^^
