Staredit Network > Forums > SC2 Assistance > Topic: Switch Like Trigger
Switch Like Trigger
Aug 16 2010, 6:39 pm
By: Vincent  

Aug 16 2010, 6:39 pm Vincent Post #1



I need a trigger that will allow me to use the same region as the end of my game level many times.

What the triggers need to do is alot like how sc1 used switches so you could use the same location without have all triggers for the location to go at once.



None.

Aug 16 2010, 7:53 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

It's called boolean (it's true or false which equals set or unset or equals 1 or 0).
A switch in SC1 was nothing else than a boolean.

Btw, you can enable and disable triggers during runtime. That may be a better implementation.




Aug 16 2010, 8:12 pm shmeeps Post #3



Yeah, disabling and re-enabling triggers is probably the easiest way. On each new round (or whatever it is), disable to trigger that acts for the old round and enable the trigger for the new round.

If you wanted them all in one trigger however, you can use the "Switch" action, with some variable like "CurrentRound", which is the current round the game is on. A switch is just like a bunch of "if then" statements, so you would code it accordingly, something like:

Code
       General - Switch (Actions) depending on Current Round
           Cases
               General - If (1)
                   Actions
                       ------- Actions for round 1 ------
               General - If (2)
                   Actions
                       ------- Actions for round 2 ------
               General - If (3)
                   Actions
                       ------- Actions for round 3 ------
               General - If (4)
                   Actions
                       ------- Actions for round 4 ------
               ------- Etc ------
           Default


Which would also work just as well.



None.

Aug 16 2010, 10:08 pm payne Post #4

:payne:

Wouldn't this works?



None.

Aug 16 2010, 10:19 pm Vincent Post #5



Quote from payne
Wouldn't this works?

I tried that couldn't get it working :S

Even tried running test document on your map and it doesn't work.



None.

Aug 16 2010, 10:25 pm payne Post #6

:payne:

Quote from Vincent
Quote from payne
Wouldn't this works?

I tried that couldn't get it working :S

Even tried running test document on your map and it doesn't work.
You're right, it doesn't work. Though I wonder why.
Anyone could tell me why it wouldn't work? The triggers make sense to me. ;o



None.

Aug 16 2010, 10:30 pm shmeeps Post #7



You don't have any events in Level 1 or Level 2, or any other trigger that runs them :prof:



None.

Aug 16 2010, 11:11 pm Vincent Post #8





What did I do wrong? It won't spawn the zealot :flamer:



None.

Aug 16 2010, 11:36 pm shmeeps Post #9



Does any part of that trigger run? I don't think that (Picked Unit) is valid for an event, but I could be mistaken.



None.

Aug 17 2010, 12:02 am Vincent Post #10



Quote from shmeeps
Does any part of that trigger run? I don't think that (Picked Unit) is valid for an event, but I could be mistaken.

It does run but I figured out a better way to make the trigger, RESOLVED.



None.

Aug 17 2010, 3:00 am payne Post #11

:payne:

Quote from shmeeps
You don't have any events in Level 1 or Level 2, or any other trigger that runs them :prof:
I thought a Condition could act as an Event. :O
So huh, I should've made "Map Initialization" and an If...Then...Else with the statements of my level-triggers?



None.

Aug 17 2010, 3:49 am shmeeps Post #12



Well, Map Initialization is only run once, at the start of the map. As far as I'm aware, the event has to fire before the trigger can run, a conditions is just a way of limiting when the trigger can run, for instance, if a certain conditions isn't met, but the event still happens.

The easiest way would probably just run them from the level-up trigger via the "Run trigger" action.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:59 am]
RIVE -- Lots of fun little nods to different works of others in the cheats too.
[2026-6-06. : 5:17 pm]
Oh_Man -- so i was today years old wen i learned rebel yell starcraft mission is named after a billy idol song. makes me wonder wat other missions are named after songs
[2026-6-04. : 3:42 am]
RIVE -- Hellooooo, Nurse
[2026-6-03. : 4:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
Please log in to shout.


Members Online: l)ark_ssj9kevin