Staredit Network

Staredit Network -> UMS Assistance -> Trouble With Triggers
Report, edit, etc...Posted by Hurricane on 2006-05-11 at 01:46:56
I am creating a type of sniper map, and I have set up a trigger to replace the flag for a team if their opponent leaves while they have the flag. I have set it up like this:


Trigger
Description:
Neutral Sniper Removal [With Flag]
Players:
¤ Player 2
¤ Player 3
¤ Player 4
Conditions:
¤ Neutral commands at least 1 Terran Ghost.
¤ Switch 10 is Set.
Actions:
¤ Set Switch 234.
¤ Kill all [men] for Neutral.
¤ Preserve trigger.
¤ Comment.


Switch 10 is set when any of Force 2 comes to the flag of Force 1, it is the switch for flagging. The next trigger is where switch 234 comes in to play.


Trigger
Description:
Player Leaves [Flag]
Players:
¤ Player 5
¤ Player 7
¤ Player 8
Conditions:
¤ Current Player commands exactly 2 Terran Missle Turret.
¤ Switch 234 is set.
¤ Current player brings exactly 0 flag to "Hot Flag."
Actions:
¤ Create 1 Flag at "Hot Flag" for current player. Apply properties (invincible).
¤ Clear Switch 234
¤ Clear Switch 10
¤ Clear Switch 12
¤ Clear Switch 13
¤ Clear Switch 14
¤ Preserve Trigger
¤ Comment


Switches 12, 13, and 14 are the switches for individual players who pick up the flag whereas switch 10 is when anyone picks up the flag. The whole problem here is that when a player who has the flag leaves: the flag is not created back at Hot Flag. Someone please help!

Report, edit, etc...Posted by Marandule1 on 2006-05-11 at 01:54:29
In this context i wouldn't use switches i would just make it soo,
Use starforge to place a player 12 ghost(neutral)
Then using the trigger editor in starforge change from kill flag for player neutral to kill for player 12 instead,
If that dosnt work then im stumpped.
another thing when you create do this.

Create flag for player .... not player 12 .
give for player .... to player 12 (use starforge for that bit)
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-11 at 02:19:18
This is kind of unrelated but it looks like you overuse switches when they are not needed. You should search for methods of triggering using less, you will be more satisified with your final results.
Report, edit, etc...Posted by Marandule1 on 2006-05-11 at 10:00:44
tongue.gif ranting.gif basic fact overloading switches cry.gif disgust.gif confused.gif
Report, edit, etc...Posted by Hurricane on 2006-05-11 at 11:20:32
Six people flagging and respawning, you tell me how to do it without switches lol.
Report, edit, etc...Posted by Heimdal on 2006-05-11 at 11:27:53
Using death counters, or placing a certain unit in a remote location, etc.

Does each player have their own flag? Does the first trigger fire? Try adding a display text trigger to see if the second one fires.
Report, edit, etc...Posted by Marandule1 on 2006-05-11 at 12:00:04
well to do with switches just....
Dont use switchs i would use mineral count for a computer.

like set gas to 234 or sumin.
or score or minerals etc
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-11 at 13:52:13
QUOTE(Hurricane @ May 11 2006, 10:20 AM)
Six people flagging and respawning, you tell me how to do it without switches lol.
[right][snapback]484279[/snapback][/right]


I wasn't saying to do it without Switches just look for a more effecent way. But I do appreciate the challenge.

So let me think 2 flags one for each time, I need to keep track of who owns the flag, and it needs to work when players are missing.

==Flag 1==


Trigger
Description:
A person picks up the flag
Players:
¤ Force 1
Conditions:
¤ Current Player brings at least one dude to {flag1}
Actions:
¤ Remove all flag for Comp1
¤ Set Deaths of 'unused unit' to 1 for current player
¤ Preserve Trigger



Trigger
Description:
Centering Location on flag holder
Players:
¤ Force 1
Conditions:
¤ Current Player suffers exactly one death of 'unused unit'
Actions:
¤ Center Location {flag1} on dude for current player
¤ Preserve Trigger



Trigger
Description:
Flag Holder Dies / Respawn
Players:
¤ Force 1
Conditions:
¤ Current Player commands exactly 0 dude
¤ Current Player suffers exactly one death of 'unused unit'
Actions:
¤ Create 1 flag for Comp1 at {flag}
¤ Set Deaths of 'unused unit' to 0 for current player
¤ Create one dude for current player at {team1 respawn}
¤ Preserve Trigger

For a respawn for a player who wasn't holding the flag use the same trigger without the first two actions. The second condition would require exactly 0 deaths.


Trigger
Description:
Flag Carrier Leaves Game
Players:
¤ Computer1
Conditions:
¤ P12 commands at least 1 dude
¤ Force 1 suffers exactly 0 deaths of 'unused unit'
¤ Comp1 commands exactly 0 flag
Actions:
¤ Kill/Remove dude owned by P12 at {flag}
¤ Create 1 flag for Comp1 at {flag}
¤ Preserve Trigger

I think that forde 1 wouldn't have the death satsified after the player left. However if that isn't true then create a trigger owned by the comp for each player so that if they control exactly 0 dude, set their deaths to 0. Make sure it runs before the above trigger and you should be set.
Also to remove non flag carrier P12 units make sure that trigger is checked after the above trigger.


Trigger
Description:
Point for Team 1
Players:
¤ Force 1
Conditions:
¤ Current Player brings at least 1 dude to {team1 flag respawn}
¤ Comp2 brings at least one flag to {team1 flag respawn}
¤ Current Player suffers exactly one death of 'unused unit'
Actions:
¤ Create 1 flag for Comp1 at {team2 flag respawn}
¤ Center location {flag1} on flag owned by Comp1
¤ Set Deaths of 'unused unit' to 0 for current player
¤ Add 1 point to whatever score keeping thing your using.
¤ Preserve Trigger


I think this should basicly cover it, other stuff can be done the same way or used independantly. No switches but it would use one death counter per team/flag
Report, edit, etc...Posted by Hurricane on 2006-05-12 at 00:27:57
Very nicely done biggrin.gif
Report, edit, etc...Posted by MasterJohnny on 2006-05-12 at 00:30:18
switches in this map...bad idea...
Next Page (1)