they really need to be more specific

T

Terra-Destroyer

Guest
ok can ne1 tell me what "set switch" doe in the cam. editor?and can ne1 be a lil more specific on how they work and teach me in some way how to use em?
 

Ilendil

Most Respected Former Admin
Reaction score
1
Switches let you enable something if someone else triggered it.
This lets you group triggers and also lets you randomize things you want.
 
T

Terra-Destroyer

Guest
yea but how do u do it?it has like "switch 1-219" how do i know which ones which?
 
U

Unregistered

Guest
u can rename the switches, switchs are mostly worthless all they do is keep track of things (like a triger can say if player brings 1 units to location 0 ; set switch 0) then some other triger can say (if switch 0 set; kill all units)
 
C

Coop

Guest
Switches are not worthless at all, i wouldnt have been able to make my map, Connect Four, without them.

Example Switch:
TRIGGER 2
(Under Player 1 Force)
Conditions:
Player Brings Exactly 1 Unit to Location
Actions:
Set 'Switch 1'

TRIGGER 2
(Under 'All Players' Forces)
Conditions:
'Switch 1' is Set
Actions:
Display Text Message 'Player Has brought a Unit to the location!'
Clear 'Switch 1'


You would need to use a switch if you wanted to announce a message to ALL the players when the main trigger is under 'Player 1' Force. If you have display text message in first trigger it would only appear to player 1. Switches are very useful. I used around 60-70 for my Connect Four map
 
T

Terranator3

Guest
Coop is right, switches are not useless. Every good map maker uses them. I for one cannot make a UMS map without them.
To know which switch is for which action, use Unregistered's idea and rename them.
To use a switch, Coops idea is a good one, but its also very basic in the fact that you can also make that same trigger without a switch unless you want to preserve it. Im not trying to put him down, he has helped me figure out a trigger using switches which is a better example of how switches work.
In one of my maps I wanted to bring a man to a beacon and set the timer, but I wanted the trigger preserved and the timer kept resetting itself and wouldnt count down.
Coop helped me with this problem:

First Trigger
CONDITION
Player X brings # of men to Location X
Switch X is cleared
ACTION
Modify Countdown Timer: Set to # seconds
Set Switch X
Preserve Trigger

Second Trigger
CONDITION
Player X brings # men to Location X
Switch X is Set
Never
ACTION
Modify Countdown Timer: Set to # seconds
Preserve Trigger

Third Trigger
CONDITION
Player X Brings Exactly 0 men to Location X
Switch X is set
ACTION
Clear Switch X
Modify Countdown Timer: Set to 0 seconds
Preserve Trigger

Im still not exactly sure how these triggers work, or why the Never condition is in there but it works. Create these triggers to see how they work and youll have a basic understanding on how to use switches.
Hope this helps
 
T

Terra-Destroyer

Guest
uhhhhhh.... i think i get it.it helped with a few triggers.thx.more help would be kindly welcomed.
 
T

Terranator3

Guest
A simpler method is to create a trigger that requires a switch.
Often times, a preserved trigger will require a switch to stop the actions from unnecesarily repeating itself. However, occasionally the trigger will still repeat itself until the action causing it to repeat is stopped.

Lets assume that I have an SCV, a Psi Emitter, and a Beacon. I want the SCV to recieve a reward for taking the Psi Emitter to the Beacon, but recieve no reward for going to the Beacon alone. I want to preserve these triggers so the SCV can bring more Psi Emitters to the Beacon for more rewards.
(for all intents and purposes I will name the location for the Beacon 'beacon', and the location for the SCV 'scv')

First I will need to specify a condition that will set the switch,
like this:

Trigger1
CONDITION
Player# commands at least 1 Psi Emitter
ACTION
Set 'Switch#'
Preserve Trigger

Trigger2
CONDITION
Player# commands at most 0 Psi Emitter
ACTION
Clear 'Switch#'
Preserve Trigger

Note: The thing about powerups such as a Psi Emitter is that no matter which player owns them, as soon as they are picked up they automatically become the property of that player until they are dropped.

Now that I have set the switch paremeters I can make my triggers for the SCV.

Trigger1
CONDITION
Player# brings at least 1 SCV to 'beacon'
'Switch#' is cleared
ACTION
Move 1 SCV for Player# at 'beacon' to 'scv'
Preserve Trigger

Trigger2
CONDITION
Player# brings at least 1 SCV to 'beacon'
'Switch#' is set
ACTION
Set Resources for Player#: Add # ore
Remove 1 Psi Emitter for Player# at 'beacon'
Move 1 SCV for Player# at 'beacon' to 'scv'
Clear 'Switch#'
Preserve Trigger

Note: By moving the SCV away from the Beacon I have 'removed' the condition required for the action to take place until the next time. And by clearing the switch I have essentially told the game that the Player no longer has a Psi Emitter and is no longer entitled to a reward.
Its a lengthy procedure, but makes for a fun game once you learn how to use switches.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top