- Joined
- Oct 8, 2005
- Messages
- 298
Ok heres the code:
That is supposed to work and not have any memory leaks but it doesnt work at all. What it does is it creates all the units at the center of playable map area and orders them to attack move to the center of playable map area. Why? I have several of these triggers running at the same time (all using those same two nonlocal variables) so i thought maybe that was the problem even though ive been told that it shouldnt cause any problems cause technically everything is called in an order and i dont have any wait commands. So to test and make sure that wasnt the problem i made this trigger:
But that did the same thing as the other trigger, it created the unit at the center of playable map area. Pleae help! why doesnt this trigger work?!
Code:
Spawning Top
Events
Time - SpawnBasicForces expires
Conditions
(Keep 0059 <gen> is alive) Equal to True
Actions
Set ATempRegion = HumanSpawnerTop <gen>
Set BTempRegion = Top 1 <gen>
Unit - Create 1 Footman for Player 11 (Dark Green) at (Center of ATempRegion) facing 270.00 degrees
Unit - Order (Last created unit) to Attack-Move To (Center of BTempRegion)
Unit - Create 1 Footman for Player 11 (Dark Green) at (Center of ATempRegion) facing 270.00 degrees
Unit - Order (Last created unit) to Attack-Move To (Center of BTempRegion)
Unit - Create 1 Rifleman for Player 11 (Dark Green) at (Center of ATempRegion) facing 270.00 degrees
Unit - Order (Last created unit) to Attack-Move To (Center of BTempRegion)
Unit - Create 1 Priest for Player 11 (Dark Green) at (Center of ATempRegion) facing 270.00 degrees
Unit - Order (Last created unit) to Attack-Move To (Center of BTempRegion)
Custom script: call RemoveRect (udg_ATempRegion)
Custom script: call RemoveRect (udg_BTempRegion)
Code:
Test
Events
Player - Player 1 (Red) types a chat message containing -test as An exact match
Conditions
Actions
Set ATempRegion = HumanSpawnerTop <gen>
Unit - Create 1 Footman for Player 11 (Dark Green) at (Center of ATempRegion) facing 270.00 degrees
Custom script: call RemoveRect (udg_ATempRegion)