Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Switch doesn't work

Creator: TristanOfVP
Time: Nov 3 2007, 3:36 pm

Post #1     TristanOfVP Nov 3 2007, 3:36 pm

[Avatar]
 offline contact
I've never really used switches before and I can't get this one to work. Basically every 260 on the timer I want it to spawn units when a command center is at the location.

Trigger("Player 6"){
Conditions:
Bring("Player 6", "Infested Command Center", "nest1", At least, 1);
Switch("Switch1", set);

Actions:
Preserve Trigger();



Conditions:
Switch("Switch1", set);
Countdown Timer(Exactly, 260);

Actions:
Create Unit("Player 6", "Zerg Hydralisk", 15, "teleport area A");
Set Switch("Switch1", clear);
Preserve Trigger();
Comment("Time spawn");


Any help would be greatly appreciated. Thanks.
Top

Post #2     Killer2121 Nov 3 2007, 4:18 pm

[Avatar]
 offline contact
hmm try at most
(user posted image)
Top

Post #3     Oyen Nov 3 2007, 7:16 pm

[Avatar]
 offline contact
First of all, the only action on your 1st trigger is preserve trigger. 2nd of all, your 2nd trigger clears your switch, yet you don't have another trigger to re-set it, so the trigger will only activate once.

I don't quite understand your timer. Do you have some triggers that reset the timer to whatever it was before it reaches 260? If not, that 2nd trigger will only activate once.
(signature image)
No Hablo Espanol!
Top

Post #4     who Nov 3 2007, 7:28 pm

[Avatar]
someone09
 offline contact
C:
player brings cc to nest
switch 1 is clear
A:
set countdown timer to 260
set switch 1

C:
switch 1 is set
player brings 0 cc to nest
A:
clear switch 1
set timer to 0

C:
switch 1 is set
timer is 0
A:
set timer to 260
create 15 hydras at spawn

Preserve Trigger should be applied to all of them.
The first trigger sets the spawn switch if he has a CC there, but if the spawn switch is cleared. It also sets the first timer.
The second one clears the spawn switch if he has no CC there, but if the spawn switch is set. It also sets the timer to 0.
The third switch activates if the spawn switch is set, and if the timer is 0. It sets the timer back up to 260 and creates hydras.
(user posted image)
Top

Post #5     NudeRaider Nov 3 2007, 8:18 pm

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Quote from TristanOfVPI've never really used switches before and I can't get this one to work. Basically every 260 on the timer I want it to spawn units when a command center is at the location.

Trigger("Player 6"){
Conditions:
Bring("Player 6", "Infested Command Center", "nest1", At least, 1);
Switch("Switch1", set);

Actions:
Preserve Trigger();



Conditions:
Switch("Switch1", set);
Countdown Timer(Exactly, 260);

Actions:
Create Unit("Player 6", "Zerg Hydralisk", 15, "teleport area A");
Set Switch("Switch1", clear);
Preserve Trigger();
Comment("Time spawn");


Any help would be greatly appreciated. Thanks.


First of all you don't need a switch here.
Just put the timer and the bring trigger into the conditions, like this:

P6
Conditions
Brings at least 1 cc to nest1
Countdown timer is at most 260s
Actions
Spawn units
[...]

But to explain how switches work:

Condition A -> set switch
Condition B -> clear switch
If switch is set -> actions

OR

Condition A -> set switch
If switch is set -> actions, clear switch

If you check your triggers there's no action that sets the switch. --> Checked switch always false --> trigger never fires
Also the exactly 260s could be a problem because triggers are only checked every 2s. Use at most 260s instead.

Btw. did you realize its a COUNTDOWN timer? Usually you check those to be 'at most 0' and set them to 260s.
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top
0 members in this topic: None
+ 0 guest(s)


[08:07 pm]
[Vi3t-X]:] -- For the horde.
[08:04 pm]
payne -- ew, stupid avatar is leading me as mafia :( damn oranges :P
[07:58 pm]
[DeVouReR]:] -- hi all
[07:53 pm]
madroc -- lol!
[07:44 pm]
TassadarZeratul -- And I got them, so no need to shout about it. :P
[07:36 pm]
madroc -- 2 actually
[07:36 pm]
madroc -- hey tazz i sent you a pm
You must log in to shout.

©2003-2008 Staredit Network.
Starcraft & Starcraft II are trademarks of Blizzard Entertainment.
Site Index   |   Terms of Service   |   Privacy Policy   |   Contributions