In an rpg I'm making, you have the option of being 1 of 4 characters, rather, the different weapons you can use. They're raynor(marine), hero dark templar, hunter killer, and Gui Montang. Now, say I want to have a hero say something. Normally you wouldn't have any problem, just use:
Current Player brings at least 1 Men to Location X
Transmission from men at location X set to Y seconds display text blah blah blah.
However, each player also has an additional unit, a zergling at this point, which has access to all the same areas as the hero. I only want this trigger to fire when the hero comes to the location, not the zergling.
I realize I can just make 4 triggers, specifying which 4 units I want it to fire for, but sometimes it's annoying making the same thing 4 times.
If blizzard had provided an "or" condition, that would be wonderful, which is really what I'm asking. Does anyone know how to make an "or", or am I just going to be stuck making sets of 4 triggers?
None.
Use these conditions in 2 different triggers:Current Player brings at least 1 Zergling to Location X
Current Player brings at least 2 men to Location X
Current Player brings exactly 0 Zergling to Location X
Current Player brings at least 1 men to Location X
That at least cuts the triggers in half. If the player brings only a zergling to the location, then nothing will happen. Hope I helped.
You could use switches to obtain a similar effect but it still requires about the same amount of extra trigger work, if not more. What I suggested seems to be the easiest way.
Post has been edited 1 time(s), last time on Mar 24 2008, 1:45 am by Dapperdan.
None.
Well, the problem with your system is the text or whatever actions could actually fire twice.
Say the hero is chilling in Location X, and then the text fires. Then a few seconds later the zergling comes over and the text fires again. I could make a separate system to prevent that I suppose, but in the end I think it will be easier to just make 4 specific triggers. Thanks for the idea though. There may be places later on where I can use that.
None.
Current Player brings at least 1 Zergling to Location X
Current Player brings at least 2 men to Location X
Switch 'x' is enabled
In the other trigger disable the switch as an action. Should still be less work than what you're going to do, but not that big of a difference I guess. Do as you will.
None.
You could make it so each set of conditions just sets a death, then at the very end put the actual actions.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
That doesn't help, I'd still need to make at least 4 triggers for the conditions. I'm trying to reduce the number of triggers, not make more work for myself.
None.
Read this:
http://www.staredit.net/topic/2181/unread/#specialTips for Tedious CodingI haven't written the application towards triggers yet, but you should get the idea.
Well, if you used Dapperdan's method, you'd have two and then a third trigger for both action blocks.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
If you used Dan's method and brought 2 zerglings there it would fire too.
So just screw it and write the trigger once then copy it 3 times and change the hero units - that's much less work than thinking about something ingenious.
There is no 'or' in sc expressions. Blizzard tried to keep it simple. Their 'or' is new triggers.
Don't be afraid of copying triggers - that's the way how sc mapping works.
If you have REALLY MANY similar triggers to do you could use a trigger duplicator and/or use scmdraft 2's text triggers.
If you used Dan's method and brought 2 zerglings there it would fire too.
So just screw it and write the trigger once then copy it 3 times and change the hero units - that's much less work than thinking about something ingenious.
There is no 'or' in sc expressions. Blizzard tried to keep it simple. Their 'or' is new triggers.
Don't be afraid of copying triggers - that's the way how sc mapping works.
If you have REALLY MANY similar triggers to do you could use a trigger duplicator and/or use scmdraft 2's text triggers.
No player has 2 zerglings or else he'd have said so. My method only requires 2 triggers.
None.
If you used Dan's method and brought 2 zerglings there it would fire too. So just screw it and write the trigger once then copy it 3 times and change the hero units - that's much less work than thinking about something ingenious. There is no 'or' in sc expressions. Blizzard tried to keep it simple. Their 'or' is new triggers.
Don't be afraid of copying triggers - that's the way how sc mapping works. If you have REALLY MANY similar triggers to do you could use a trigger duplicator and/or use scmdraft 2's text triggers.
If blizzard had provided an "or" condition, that would be wonderful, which is really what I'm asking. Does anyone know how to make an "or", or am I just going to be stuck making sets of 4 triggers?
I know Nude. Normally I wouldn't reply to your response, but that sounded very condescending, and the point of this thread is to think up "an ingenious method," I already know I can just copy 4 times, I said that in my original post. The battle system in my map has 336 triggers so far and only 2 enemies. I've copied triggers. I know "how sc mapping works." You should've derived everything you said was irrelevant from what I said in my first post.
Also, I tried to download a trigger duplicator and it gave me an error message when I tried to run it. That was from maplantis though, maybe I'll look for it on staredit and it'll be there.
As for your method Dan, simply adding in a switch wont work, because switches don't start off enabled, they start disabled, so if the condition for one is "disabled" it will fire, but the other will not, and if the "enabled" one is the one whose conditions are met, it won't fire at all. However, a death counter would work in place of the switch because of the 0 or 1 settings, so thanks for the idea.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
No player has 2 zerglings or else he'd have said so. My method only requires 2 triggers.
I should look more carefully sometimes...
I know Nude. Normally I wouldn't reply to your response, but that sounded very condescending, and the point of this thread is to think up "an ingenious method," I already know I can just copy 4 times, I said that in my original post. The battle system in my map has 336 triggers so far and only 2 enemies. I've copied triggers. I know "how sc mapping works." You should've derived everything you said was irrelevant from what I said in my first post.
If blizzard had provided an "or" condition, that would be wonderful, which is really what I'm asking. Does anyone know how to make an "or", or am I just going to be stuck making sets of 4 triggers?
You also asked if it's maybe NOT possible. I did not intend to be condescending - sry if I was. I just wanted to explain why you'd find no other way and I didn't know your skill level, so I mentioned the trigger duplicator thing.
You can of course every time when you need an 'or' think of some workaround but you will not find a generic trigger construct you can always apply to simulate an or - except multiple triggers.
You can have all of the possibilities set a death counter that fires off the actions that should be associated with each condition. It's more efficent than copying the triggers 20 times, plus if you want to edit them, you only have to change one set of actions.
As for your method Dan, simply adding in a switch wont work, because switches don't start off enabled, they start disabled, so if the condition for one is "disabled" it will fire, but the other will not, and if the "enabled" one is the one whose conditions are met, it won't fire at all.
Yeah you know what I mean... it could be worked around... meh... umm
However, a death counter would work in place of the switch because of the 0 or 1 settings, so thanks for the idea.
Yeah that.
I haven't visited an SEN ums assistance forum in such a long time, good to see I can still halp. It used to be where I spent most of my time... /nostalgia
None.
It used to be where I spent most of my time...
chillin out maxin' relaxin' all cool and all shootin' some b-ball outside of the school.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
i dont think its possible. if you cut down on triggers the way DD suggested you need a switch or a deathcount.
Post has been edited 3 time(s), last time on Mar 25 2008, 5:05 am by Saucon.
None.
... when a couple of guys, they were up to no good, started makin trouble in the neighborhood...
Can someone explain to me moose's post?
Quote from Mini Moose 2707
You can have all of the possibilities set a death counter that fires off the actions that should be associated with each condition. It's more efficent than copying the triggers 20 times, plus if you want to edit them, you only have to change one set of actions.
Unless I'm mistaken, I'm still going to need at least 4 condition triggers...
Oh, and sorry for the snap Nude. I may have had something up my ass when I replied then....
None.
you could create a burrowed unit at the spot, and once the hero goes there remove it, all in one trigger, kind of in thought with Dapperdans idea. except the burrowed unit will prevent it from fireing twice.
Conditions:
Current Player brings at least 1 Zergling to Location X
Current Player brings at least 2 men to Location X
player x brings 1 (burrowed unit) to location x
Actions:
remove 1 (burrowed unit) for player x
display text
Conditions:
Current Player brings exactly 0 Zergling to Location X
Current Player brings at least 1 men to Location X
player x brings 1 (burrowed unit) to location x
Actions:
remove 1 (burrowed unit) for player x
display text
None.
If you'll notice, that's 4 triggers... lol good thoughts, but it's still faster to copy
Current Player Brings 1 Hero1 To Location X
Display Tex
4 times and simply replace with Hero2 Hero3 Hero4. Hrm. Thanks though.
None.
What moose was saying was something like this:
Conditions:
Bring X to Y
Actions:
Set Deaths to Z
and then...
Conditions:
Deaths Z
Actions:
Whatever
Now, you have 1 copy of the trigger with the actions, but it works for all players, if they have the correct deaths. The conditions are in the first trigger, but the actions are in the second trigger. It essentially links the two together, so you can make 12 triggers, each with their own conditions (like an "or" function) and they ALL have the same actions, but you don't have to write them out or change them. You can also change the action by either changing the deaths, or just changing the action trigger.
On a sidenote, couldn't you have made the 4 triggers in the amount of time it took to ask for help?
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"