• 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.

NO LEAK, spawns...

Status
Not open for further replies.
You could just create units and make them spawn to regions. I think this will work:
  • 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.--
Then you can just keep on doing that and create checkpoints so that your units move in a line. Enjoy!

[Note: You may also use:
  • Spawning Trigger
  • Events:
  • Conditions:
  • Actions:
  • General - For each (IntegerA) from 1 to <Spawn Number> do (Actions)
To shorten up your work instead of doing it for like 10 units a bunch of times. :spell_breaker:)
 
Nope, when removing locations, that is only when you create a point, not a region. When you set it to a variable, that is when you must remove it. If you are using certain points from variables, you will have to do this, but if you use regions, you won't have to do this:
  • Test Trigger
  • Events:
  • Conditions:
  • Actions:
  • Custom Script: call RemoveLocation( udg_<Insert Point Here> )
I hope this helps! :smile:
 
Level 9
Joined
Jul 27, 2006
Messages
652
Um, that leaks...

Just so you know, Here is right.
That leaks locations. When using "center of region", the game creates a location, which is never removed.
Use a variable for the location ("center of region") and then destroy the location (call DestroyLocation(udg_loc))
Im not 100% sure but i think thats right.
 
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:
  • 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] )
Sorry for the confusionz..

Also, I don't think it is DestroyLocation, that might work, but I know that RemoveLocation works. I'm 110% sure. ^^
 
Level 2
Joined
Jul 21, 2005
Messages
32
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> )
 
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> )

Sorry, I don't mean to be rude or anything, but did you read my comment afterwards? It is:
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:
  • 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] )
Sorry for the confusionz..

Also, I don't think it is DestroyLocation, that might work, but I know that RemoveLocation works. I'm 110% sure. ^^

I just wanted to let ye know that I already said that... :thunbsup:
 
Status
Not open for further replies.
Top