Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Hyper trigger question
Hyper trigger question
Mar 22 2013, 12:09 am
By: The_Master  

Mar 22 2013, 12:09 am The_Master Post #1



So I have an eight player map with hyper triggers and I wanted it playable after any player quit so I setup switches to see who was in the game and only run the hyper triggers on one player so as to not cause lag from redundant triggering.

I still want to have waits inside of some game triggers. Would stacking a calculated number of shortish waits in a trigger be functionally equivalent to a longer wait without messing with the hyperness of other triggers in the map?

An alternate probably flawed solution; could triggers, such as hyper triggers be executed on players higher than eight?



None.

Mar 22 2013, 12:27 am Pr0nogo Post #2



If the waits are in triggers that run for the same player that owns the hypertriggers, they will cause inaccuracies. But if, say, player 8 has three hypertriggers (the recommended amount), and player 7 (or any player besides player 8) has a trigger with a wait 5000 action, you probably won't get too many problems.




Mar 22 2013, 12:30 am jjf28 Post #3

Cartography Artisan

Quote
An alternate probably flawed solution; could triggers, such as hyper triggers be executed on players higher than eight?

Triggers only run for players 1-8

Quote
So I have an eight player map with hyper triggers and I wanted it playable after any player quit so I setup switches to see who was in the game and only run the hyper triggers on one player so as to not cause lag from redundant triggering.

Triggers that only change a death-count or a switch are extremely unlikely to cause lag (I've had to use over 1000 of such triggers for math functions in narrow straits, never seemed to be laggy) so you really shouldn't worry about extra triggers when it comes to performance, unless your conditions/actions are:

- Creating/Destroying unit(s)*
- Bring/Location based conditions
- Order/AI actions*
- Give actions*
- Move actions

* varies greatly with the number of units in a given trigger

You may want to worry about extra triggers when it comes to map size, though.

Post has been edited 2 time(s), last time on Mar 22 2013, 12:41 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Mar 22 2013, 12:41 am Moose Post #4

We live in a society.

You can run one wait per player at a time by giving the hyper triggers to All Players and putting the Hyper Triggers at the BOTTOM of the trigger list so that they are executing last. Having hyper triggers owned by all players will not induce lag, I am sure of this because I've used this method in Überena and Armored Core, among other maps, where there was no dedicated computer player that would always be in the game. The only potential problems can come up if every player in the game runs a nonzero wait simultaneously - and I am not even sure if that actually would cause a problem anyway.




Mar 22 2013, 3:01 am Lanthanide Post #5



Frankly I find using Waits confusing anyway, because they apply only to the trigger in which the wait appears and don't apply to other triggers, so if you have a complex series of events that need to take place that requires you to have more than 1 trigger to implement the system, using waits in any of the triggers makes the logic much harder to understand.

Anything that can be done with waits, can be done using the Death Count technique instead, and with much more precision, trace-ability and are much easier to debug.



None.

Mar 22 2013, 4:45 pm The_Master Post #6



Quote from Lanthanide
Frankly I find using Waits confusing anyway, because they apply only to the trigger in which the wait appears and don't apply to other triggers, so if you have a complex series of events that need to take place that requires you to have more than 1 trigger to implement the system, using waits in any of the triggers makes the logic much harder to understand.

Anything that can be done with waits, can be done using the Death Count technique instead, and with much more precision, trace-ability and are much easier to debug.

Trying to see how to implement this.
Reserve a certain death count to a sequence.
Some condition is met and it begins incrementing the death count.
Other triggers conditions are met at specific death counts.
Sounds like it would take allot of triggers to do something you should be able to do in just one but I can see how it could be useful.


I had an audio dialog sequence but it would freeze up in the middle of playing due to wait blocks caused by hyper triggers.

I have a series of switch I call player focus 1-8. So if player 6 has focus and a focus related trigger runs it does something to for that player and cycles the focus to the next player. I have another set of triggers that when a player has focus if he is not in the game it cycles it past him. I am also using the focus switches as a condition to running the hyper triggers, this gives me the added ability to turn them on or off.

In order to play an audio sequence with minimal effect to the hyperactivity of the game this is the function I generated.


Collapse Box


The first command removes focus from every player, longer waits are replaced with a series of short ones. At the end it sets focus on player one. I may end up adding a hyper hold switch as a condition in the hyper triggers so I don't change focus.

Quote from Mini Moose 2707
You can run one wait per player at a time by giving the hyper triggers to All Players and putting the Hyper Triggers at the BOTTOM of the trigger list so that they are executing last. Having hyper triggers owned by all players will not induce lag, I am sure of this because I've used this method in Überena and Armored Core, among other maps, where there was no dedicated computer player that would always be in the game. The only potential problems can come up if every player in the game runs a nonzero wait simultaneously - and I am not even sure if that actually would cause a problem anyway.

I kept getting wait blocks but I did not pay much attention to where the hyper triggers executed from. Maybe I could have just moved them and not had to deal with any of this hassle.


I frequently use trigedit alpha 1 included in scmdraft 2 v 0.8, is there a utility to add a condition or action from a bunch of triggers at once? I have used notepad to find and replace things like switch triggers I add as padding in EDUgen, and I can use find and replace to remove an action or condition but I cant seem to find a way to add them.

Post has been edited 1 time(s), last time on Mar 22 2013, 6:07 pm by The_Master. Reason: Thanks for showing how to colapse box



None.

Mar 22 2013, 5:26 pm jjf28 Post #7

Cartography Artisan

Quote
Also how do you create collapsible text fields in a post on this forum?

Collapse Box




TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Mar 22 2013, 6:11 pm Roy Post #8

An artist's depiction of an Extended Unit Death

Quote from The_Master
I frequently use trigedit alpha 1 included in scmdraft 2 v 0.8, is there a utility to add a condition or action from a bunch of triggers at once? I have used notepad to find and replace things like switch triggers I add as padding in EDUgen, and I can use find and replace to remove an action or condition but I cant seem to find a way to add them.
You can use RegEx in a text editor of your choice to do more powerful find/replace functions. If you aren't very well-versed in anything in particular, you might want to check out my find/replace program: http://www.staredit.net/topic/15296/. That should get you most of the way there, even if you don't know RegEx.




Mar 22 2013, 7:06 pm Lanthanide Post #9



Quote from The_Master
Trying to see how to implement this.
Reserve a certain death count to a sequence.
Some condition is met and it begins incrementing the death count.
Other triggers conditions are met at specific death counts.
Sounds like it would take allot of triggers to do something you should be able to do in just one but I can see how it could be useful.
Yes, if the thing you're trying to do *can* work in just 1 trigger, then using waits is simpler for that specific system. However sometimes you simply can't have everything in 1 trigger: say you have a complex system with many parts to it, and parts have different conditions for firing. Eg parts A B C and D, and B should only fire if a certain unit is in a location, and D should only fire if B did. Then having a single trigger with waits simply won't work. Similarly you have only have 64 actions in a trigger; I have had systems where I needed to use multiple triggers simply because the number of actions to fire wouldn't fit in a single trigger.

As aforementioned with wait blocks however, if you have a single system that could be done in 1 trigger with waits, those waits can end up interfering with other systems with waits in them. It's much easier just to design your map from the ground up without waits, rather than having to go back later and strip them all out (I know, from painful experience).



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[01:05 am]
Vrael -- that's better
[12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[10:18 pm]
Vrael -- who says I'm not a total madman?
[02:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7: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
Please log in to shout.


Members Online: jun3hong