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.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: Excalibur