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.
[08:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[2024-5-09. : 11:31 pm]
Vrael -- :wob:
[2024-5-09. : 8:42 pm]
Ultraviolet -- :wob:
[2024-5-08. : 10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[2024-5-08. : 10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
Please log in to shout.


Members Online: Vrael, 2harpere8891ho1