I have the following code in this new scenario im trying to make:
Condition:
Current player commands the most 'men' at 'location'
Action:
Create 4 'Zealots' at 'location' for current player
wait 10000 milliseconds
preserve trigger
What I meant to happen here, is if someone commands the most units at this location, then they get 4 zealots, and that repeats every 10000 milliseconds as long as they control the most units at that location when the trigger loops. What does happen is usually nothing. 10000 milliseconds go by and no new units are created. Sometimes though, it will create the units, but it doesn't give them to the player that commands the most units in that location, it gives them to a rescuable computer player i have in the game, which should never have any units. Anyone have a clue whats going on here? I assumed it was a StarEdit bug, but I couldn't find any evidence that there is a bug like that in StarEdit. Thanks.
EDIT: After more tests, I found that it will create the units for the resuable player if no-one controlls units in that location when it triggers... wtf.
"Current player commands the most at location" not working.?
-
- Terran Academy Student (50k mineral debt)
- Posts: 7
- Joined: Sat Jan 24, 2009 1:24 pm
"Current player commands the most at location" not working.?
Last edited by badseed1 on Sat Jan 24, 2009 1:58 pm, edited 1 time in total.
- Lavarinth
- Xel'naga Administrator
- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: "Current player commands the most at location" not working.?
What player are you doing this for? Sounds best if you select the active players (Player 1, Player 2, Player 3, etc) instead of a Force, incase you a have a force, or all players.
What units are being taken there? Have you tried "any unit" instead? If that doesn't work, probably best to use switches to trigger it on and off.
What units are being taken there? Have you tried "any unit" instead? If that doesn't work, probably best to use switches to trigger it on and off.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator
-
- Terran Academy Student (50k mineral debt)
- Posts: 7
- Joined: Sat Jan 24, 2009 1:24 pm
Re: "Current player commands the most at location" not working.?
I wanted it to be for any player, except of course the rescuable player, so I have it set to all players. I tried copying the same trigger and setting them each to a single player, same result, except at least this time, the rescuable player wasn't getting any units. But neither is the current player! The reason I use 'men' instead of 'any unit' is because the rescuable team has rescuable bunkers around the map, and I don't want the rescuable player recieving any units, or the bunkers counting as units. The units that are being taken there are either zealots, firebats, hydralisks, peons, or heroes. I've seen similar maps to what i'm trying to create. I don't see any reason for it not to work.Lavarinth wrote: What player are you doing this for? Sounds best if you select the active players (Player 1, Player 2, Player 3, etc) instead of a Force, incase you a have a force, or all players.
What units are being taken there? Have you tried "any unit" instead? If that doesn't work, probably best to use switches to trigger it on and off.
Here is the breakdown of the whole scenario, it's really simple: There are 8 locations covering the whole map. Every human player starts out with a few men. All I need is every minute or so, for each location the current player controlls the most units at, they get bonus units in that location. Should be simple right?
- Thalraxal
- Protoss Stargate Concierge
- Posts: 1212
- Joined: Sun Aug 12, 2007 12:42 pm
- Location: Ontario, Canada
Re: "Current player commands the most at location" not working.?
I think your 'wait' commands might be stacking and messing things up. I advise adding a switch, and breaking things up a little. Try this instead:
TRIGGER 0
(This one is just to initialize the switch)
Conditions:
Always
Actions:
Set 'Switch 1'
TRIGGER 1
Conditions:
'Switch 1' is 'set'
'Current Player' brings 'atleast 1' 'men' to 'Location X'
'Current Player' commands the most at 'Location X'
Actions:
Clear 'Switch 1'
Create '4 Zealots' at 'Location X' for 'Current Player'
Preserve Trigger
TRIGGER 2
(This trigger will reset Switch 1, and let the Trigger 1 fire again. I advise placing it under a different player slot than Trigger 1. Maybe that rescuable player? Each wait command should be under a different player slot, to ensure that they don't mess each other up. Especially longer waits like this one. Oh, and the Elapsed Scenario Time is just to make sure the trigger doesn't fire before the switch is initialized)
Conditions:
'Switch 1' is 'Cleared'
Elapsed Scenario Time is 'atleast 1 game second'
Actions:
Wait 10000 miliseconds
Set 'Switch 1'
Preserve Trigger
TRIGGER 0
(This one is just to initialize the switch)
Conditions:
Always
Actions:
Set 'Switch 1'
TRIGGER 1
Conditions:
'Switch 1' is 'set'
'Current Player' brings 'atleast 1' 'men' to 'Location X'
'Current Player' commands the most at 'Location X'
Actions:
Clear 'Switch 1'
Create '4 Zealots' at 'Location X' for 'Current Player'
Preserve Trigger
TRIGGER 2
(This trigger will reset Switch 1, and let the Trigger 1 fire again. I advise placing it under a different player slot than Trigger 1. Maybe that rescuable player? Each wait command should be under a different player slot, to ensure that they don't mess each other up. Especially longer waits like this one. Oh, and the Elapsed Scenario Time is just to make sure the trigger doesn't fire before the switch is initialized)
Conditions:
'Switch 1' is 'Cleared'
Elapsed Scenario Time is 'atleast 1 game second'
Actions:
Wait 10000 miliseconds
Set 'Switch 1'
Preserve Trigger
-
- Terran Academy Student (50k mineral debt)
- Posts: 7
- Joined: Sat Jan 24, 2009 1:24 pm
Re: "Current player commands the most at location" not working.?
Awesome, thanks alot Thalraxal. Got it to work, just having trouble with the time delay, it just keeps instantly adding units no matter how many milliseconds it waits to set the switch (works great with one, but there are 8 locations). Here's some pie for you. 
EDIT: got it to work. Thanks again. I'll post the map when it's done so you all can see what you helped create

EDIT: got it to work. Thanks again. I'll post the map when it's done so you all can see what you helped create

Last edited by badseed1 on Sat Jan 24, 2009 4:14 pm, edited 1 time in total.
- Lavarinth
- Xel'naga Administrator
- Posts: 6539
- Joined: Wed Aug 16, 2006 5:21 pm
- Location: His Ashworld Planet
Re: "Current player commands the most at location" not working.?
Try making separate switches for each location.
- - Lavarinth
Campaign Creations Administrator
Campaign Creations Administrator