View Full Version : Need Help with a trigger
RowenCleric
02-21-2004, 3:39 PM
I am having trouble with a certain trigger on the map I have been working on. The trigger goes like this:
Conditions:Player 6 brings exactly 5 units to location so and so.
Actions: Create 1 specific unit at that location
Display a message to everyone
However when I actually play the game, once the conditions are met three of that unit is spawned instead of just 1 like I want. Is there something wrong that I am doing?
Also how do you change the colors of players, and create colors such as black, is there a specific program needed? ( I have the Starcraft X-tra Editor ) If so where would could I get such a program.
Thanks for your time!
Doom_Dragoon
02-21-2004, 5:06 PM
Add a condition that says if they bring 0 of the unit you wanted created.
The color change should be done in SCM Toolkit. Please note that the colors will revert to normal once the map is re-saved in StarEdit or any other editor. So in other words, do that last.
The trigger is wrong because you are running it for multiple players. If you check the trigger dialog, you are running it for 3 separate players (or a whole force, with 3 active players in that force).
Because of that, the trigger executes 3 times, and because the conditions are met each time (and the trigger is preserved), you see 3 units being created.
What you'd need to do to keep the display for all players WITHOUT creating 3 units, you should set a switch at the end of your trigger, then create another one.
The new one's condition should be "Switch 1 (or whatever switch you set) is set", while it's actions should be "Display Message".
If you want this one to execute each time the player brings the units to the location, also clear Switch 1 and preserve trigger. The trigger's players should be those that are players of your previous trigger in your current version of the map (all of those who you want the message to be displayed for). If they are in one force, then you can just set the force as the "player" the second trigger executes for.
And now, have the FIRST trigger (the unit creation one) owned by the player the unit is created for.
Good luck.
UED77
EdvardMunch
02-21-2004, 5:19 PM
http://www.stormcoast-fortress.net/download.php?download=scmdraft2 = The special editor needed to use lots of neat colors. StarForge also works, but it will erase all of the sounds in your map if you use it, unless some new version has fixed that.
As for the trigger problem, odds are it is caused by the trigger being owned by either 3 players, or by being owned by a force with 3 players in it. The trigger fires once for each player. You can either take Doom's suggestion (which seems like it will work anyway) or a more annoying and complicated solution of...
PLAYERS
- Computer Player X (only one computer player)
CONDITIONS
- Player 6 brings exactly 5 units to "somewhere"
ACTIONS
- Create 1 Unit Y at "somewhere" for player Z
PLAYERS
- Human Players' Force
CONDITIONS
- Player Z brings at least 1 Unit Y to "somewhere"
ACTIONS
- Display text messages
EDIT: Oh SOB, I should've known that would happen. You must've posted just as I started typing. Well, I recommend my way, because it economizes your switches. However, if you're going to have a Unit Y in "somewhere" before the trigger fires, then go with UED's solution.
Lol, same thing happened to me with Doom's message. The beauty of a forum.
Btw, I probably have a Switch Fetish cuz I always use them - they work nicely tho.
UED77
EdvardMunch
02-21-2004, 6:57 PM
Heh, I have a switch fetish too, which is why I'm trying to steer away from using them, because it can sometimes take a while to find the switch I'm after, and organizing them would just take more time. Units, on the other hand; I can pull up any unit I want in five seconds.
Hmmm... switches can be named, Edvard :)
Using units for this purpose has it's drawbacks... what if the unit is already used? What if the unit cannot be created? What if the player is inactive from some reason?
Switches always work :)
UED77
EdvardMunch
02-21-2004, 8:46 PM
Switches can be named, but not sorted. I don't create my switches in any sort of order, since I don't generally work on the map in chronological order. If I'm using 40 or so switches they can be a pain to sort through.
The unit method is far from sound, but I'll use it if I can.
RowenCleric
02-21-2004, 10:05 PM
Thanks for ally our help everyone, I really appreciate it.
Terran-Civilian
02-24-2004, 5:05 PM
i didnt help but your welcome
Doom_Dragoon
02-24-2004, 5:08 PM
Spam at its best. *sigh*
ZeroDarkStar
02-24-2004, 5:15 PM
i didnt help but your welcome
Does it get any worse?
Please refain from spamming, or don't be surpised when instead of your message, a little
"Message was deleted by <insert moderator name here>."
starts appearing.
AHHHHHHHH! Holy ****!
This is simple! You don't need something that complicated! Blizzard has even seen it! www.battle.net/scc click on FAQs and StarEdit!
All you need to do is say create for current player! That way it will only create it once!
Switches? Units? OVERKILL!
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.