Conditions
Mar 24 2008, 1:25 am
By: Vrael  

Mar 24 2008, 1:25 am Vrael Post #1



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.

Mar 24 2008, 1:32 am Dapperdan Post #2



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.

Mar 24 2008, 2:01 am Vrael Post #3



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.

Mar 24 2008, 2:10 am Dapperdan Post #4



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.

Mar 24 2008, 2:13 am O)FaRTy1billion[MM] Post #5

👻 👾 👽 💪

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!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Mar 24 2008, 3:48 am Vrael Post #6



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.

Mar 24 2008, 4:24 am A_of-s_t Post #7

aka idmontie

Read this: http://www.staredit.net/topic/2181/unread/#specialTips for Tedious Coding

I haven't written the application towards triggers yet, but you should get the idea.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Mar 24 2008, 6:10 am O)FaRTy1billion[MM] Post #8

👻 👾 👽 💪

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!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Mar 24 2008, 8:01 am NudeRaider Post #9

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.




Mar 24 2008, 9:18 pm Dapperdan Post #10



Quote from NudeRaider
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.

Mar 24 2008, 10:04 pm Vrael Post #11



Quote from NudeRaider
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.

Quote from Vrael
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.

Mar 24 2008, 11:30 pm NudeRaider Post #12

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

Quote from Dapperdan
No player has 2 zerglings or else he'd have said so. My method only requires 2 triggers. :><:
I should look more carefully sometimes... :unsure:

Quote from Vrael
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.
Quote from Vrael
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.




Mar 24 2008, 11:40 pm Moose Post #13

We live in a society.

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.




Mar 25 2008, 1:03 am Dapperdan Post #14



Quote
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

Quote
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.

Mar 25 2008, 4:20 am rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Dapperdan
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?"

Mar 25 2008, 4:54 am Saucon Post #16



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.

Mar 25 2008, 5:04 am Vrael Post #17



... 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.

Mar 25 2008, 5:07 am Saucon Post #18



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.

Mar 25 2008, 5:33 am Vrael Post #19



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.

Mar 25 2008, 5:52 am rockz Post #20

ᴄʜᴇᴇsᴇ ɪᴛ!

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?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
Please log in to shout.


Members Online: Roy