PDA

View Full Version : *Basic (I think) Trigger help!!


Flaming_Stevie
04-30-2006, 5:14 PM
I am making a defence type game, one with many different levels. The problem i am having is getting the levels to actually start! I am using switches, which i understand are tricky, and i need to know how to do this because as of now it does not work. here is my code...

(all on the defender force)

slot1
C: Always
A: Modify Countdown Timer: Set to 180 seconds.

slot2
C: Countdown Timer is at exactly 1 seconds.
A: Set 'Wave1'

slot3
C: 'Wave1' is set.
A: Create 6 zergling at 'Enemy Spawn' for Attackers
Order all units (the lings are the only units the Attackers own) to Attack to 'End Point'
Wait 2000 milliseconds (2 seconds)
Preserve Trigger

^^^^^creating a 'non-stop' swarm of enemies.

The problem is!!! It doesn't work! Why not?

Hotshot
04-30-2006, 5:21 PM
Try to use 'at most' instead of 'exactly'.

SuiCidAl-KiSmEt
04-30-2006, 5:53 PM
Yes, the "exactly" value doesn't really help with countdown timers. Also, you have to have a switch in the same trigger that has the countdown trigger. So it'll be:

Slot 1
C: Always
A: Modify Countdown Timer: Set to 180 seconds.
A: Set 'Timer'

Slot 2
C: Countdown Timer is at exactly 1 seconds.
C: Switch 'Timer' is set
A: Set 'Wave1'

You really don't need Slot 2, you can have slot 3 have slot 2's conditions instead.

Hotshot
04-30-2006, 6:38 PM
Yeah, I forgot to say add the extra switch. Good observation. :)
Without the extra switch the trigger would activate instantly.

Flaming_Stevie
04-30-2006, 8:00 PM
Yes, the "exactly" value doesn't really help with countdown timers. Also, you have to have a switch in the same trigger that has the countdown trigger. So it'll be:

Slot 1
C: Always
A: Modify Countdown Timer: Set to 180 seconds.
A: Set 'Timer'

Slot 2
C: Countdown Timer is at exactly 1 seconds.
C: Switch 'Timer' is set
A: Set 'Wave1'

You really don't need Slot 2, you can have slot 3 have slot 2's conditions instead.

lol ya that looks about right. but that doesn't solve it.

slot 3 occupies the actual attack, like this...

Slot3
C: 'wave1' is set
A: create 6 zergling at enemy spawn for Attackers
issue order to all 'Any Unit' owned by 'Attackers' at 'anywhere' to 'Attack' 'Location8'
wait 2000 milliseconds
preserve trigger

^^^^^ is THAT right, because i obvioulsy need that to make it work. as of now, with the slots 1-2 u gave me (which i have already tried) and my slot 3, when the 3 min is up nothing happens :(

i need help!

Hotshot
04-30-2006, 8:19 PM
You could try being specific (like saying 'Enemy Spawn') instead of saying 'Anywhere', but if it is attacking/moving correctly then its OK. Also, depending on how many players are in the 'Attackers' force will change the amount of Zerglings created, but it sounds like you are getting the amount of Zerglings you wanted (6). I might have to try your code out later to see just exactly what is wrong, but I cant right now. Seems OK from my standpoint atm.
Did you change the 'Exactly' to 'At Most' with the timer?

SuiCidAl-KiSmEt
04-30-2006, 8:40 PM
Err yah, I put 'exact' instead of 'most' after I told you not to. My bad. If you don't get it to work, I'll experiment on it.

Flaming_Stevie
05-01-2006, 7:52 AM
Err yah, you put 'exact' instead of 'most' after I told you not to. My bad. If you don't get it to work, I'll experiment on it.

it didn't work :'(, anyways, can u please try - and if it works for u put the scripting here. also, if it doesn't please provide an alternate way if u can - MUCH THANKS!

You could try being specific (like saying 'Enemy Spawn') instead of saying 'Anywhere', but if it is attacking/moving correctly then its OK. Also, depending on how many players are in the 'Attackers' force will change the amount of Zerglings created, but it sounds like you are getting the amount of Zerglings you wanted (6). I might have to try your code out later to see just exactly what is wrong, but I cant right now. Seems OK from my standpoint atm.
Did you change the 'Exactly' to 'At Most' with the timer?

hehe ya i wrote it wrong. it is at enemy spawn.

Hotshot
05-01-2006, 8:22 AM
Permit me to provide the solution to your problem in map form. You can thank me later. :P
This map counts down from 10 seconds when it starts, as well as sets a switch. When the timer is at most 1 second, and the switch is set, it will create 6 Zerglings at the 'Begin' location and wait 5 seconds before repeating. These units are then ordered to attack to the 'Destroy' location, where they are then destroyed upon arrival (so as not to crowd up the place). Of course, you can change the variables as you wish (set the timer for 3 minutes, make the timer at most 0 seconds, wait 20 seconds (or other conditions) before repeating and whatnot).

Flaming_Stevie
05-01-2006, 3:56 PM
Permit me to provide the solution to your problem in map form. You can thank me later. :P
This map counts down from 10 seconds when it starts, as well as sets a switch. When the timer is at most 1 second, and the switch is set, it will create 6 Zerglings at the 'Begin' location and wait 5 seconds before repeating. These units are then ordered to attack to the 'Destroy' location, where they are then destroyed upon arrival (so as not to crowd up the place). Of course, you can change the variables as you wish (set the timer for 3 minutes, make the timer at most 0 seconds, wait 20 seconds (or other conditions) before repeating and whatnot).

wow, just wow! u really went above and beyond to help me and i thank u intimately for that. it works :D