Staredit Network

Staredit Network -> UMS Assistance -> Conditional Hyper Triggers?
Report, edit, etc...Posted by yoni45 on 2006-05-09 at 02:55:43
Alright, I have a feeling that the reason I get considerable lag on my map as there are more units placed on it, is that there are alot of triggers that have conditions that deal with checking units, and they're running on hyper triggers as well...

So, I figured I would use something I thought was working on my map before...

I have a switch condition on all 3 of my hyper trigger blocks... There's an action that needs to be done with hyper triggers at game start, after which they are no longer required for a set period of time...

Now, if I don't turn on the switch, or if I turn it on and right back off again, the actions at the start don't get done with hyper triggers... so that works, the hyper triggers don't activate...

However, once the actions are finished, and I turn the switch off, they still seem to affect the trigger response times...

First, I placed a "display text" action on one of the hyper triggers, and the message continued to show up even when the switch was off...

To make sure all my triggers were firing correctly, I placed a "display text" with "TURNING ON" and "TURNING OFF" next to every action that dealt with the switch that would turn it on or off... As expected, I get a TURNING ON right at game start, and TURNING OFF a few seconds later... so the switch turns off...

To make sure the hypers were on, i set a "create marine at location" preserved trigger, and it was pumping out 12 marines/second, even when the switch was off...

I made sure to catch every action that could possibly turn the switch on... I copied the entire trigger text from SCM Draft to notepad and did a Find on the switch... every one of them returns a message when turning on or off...

Is there perhaps some sort of time delay on hyper triggers before they stop working? (ie, in the short amount of time it ran X million times, so its running off that now?)

Otherwise, i'm stumped... confused.gif
Report, edit, etc...Posted by Heimdal on 2006-05-09 at 10:25:07
QUOTE(yoni45 @ May 9 2006, 01:55 AM)
Is there perhaps some sort of time delay on hyper triggers before they stop working? (ie, in the short amount of time it ran X million times, so its running off that now?)

Otherwise, i'm stumped...  confused.gif
[right][snapback]482809[/snapback][/right]
I'm pretty sure that this is the case. http://www.staredit.net/index.php?tutorial=128
Report, edit, etc...Posted by Kenoli on 2006-05-09 at 12:47:18
If you're just trying to reduce the lag that the triggers generate, you could try making less-hyper hyper triggers. Just use a longer wait time, like 500 or 1000.
Report, edit, etc...Posted by yoni45 on 2006-05-09 at 14:28:29
QUOTE(Heimdal @ May 9 2006, 08:24 AM)
I'm pretty sure that this is the case.  http://www.staredit.net/index.php?tutorial=128
[right][snapback]482847[/snapback][/right]



Heimdal, that's absolutely beautiful =D

3 sets of hypers with 64 waits on a secondary switch,

2 sets of hypers with 10 waits on a primary switch for whats needed to be set at game start, once set primary switch turns off, and (10x10*0.084=) 8.4 seconds after starting, the first set of hypers turn off... biggrin.gif

And guess what? THE LAG IS GONE! G-O-N-E! holiday.gif

So, put that in the notes somewhere, having conditions that have to do with checking units increase processing time, based on both number of triggers with such conditions, frequency of checking (hyper triggers or not), as well as number of units on the map... biggrin.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-09 at 20:44:53
QUOTE(yoni45 @ May 9 2006, 01:28 PM)
So, put that in the notes somewhere, having conditions that have to do with checking units increase processing time, based on both number of triggers with such conditions, frequency of checking (hyper triggers or not), as well as number of units on the map...  biggrin.gif
[right][snapback]482924[/snapback][/right]

It seems accoring to what I read you are jumping to conclusions. You decided that condidtions checking units cause lag when there are alot of other factors involved. The way you have your note written, that would technaclly be true with any operation in starcraft or with computers in general.
All you have proved is that you have a trigger or trigger that when when it runs 12 times a second then it lags. Then you decided with no reasoing that it was the conditions that check units ignoring all other actions and conditions in your map.


Anyways to address to your orignal question. Standard hyper triggers cannot be turned off easly simply because there designed to continue fireing for long amounts of time. If you did alot of testing you would find out if you had less waits in each of the hyper triggers then it would take less time to turn them off. In addition although it would take less time you would require more to keep the hyper effect going when it is turned on.

The best solution is to use the two triggers mentioned in Dabbu's tutorial at the very end. Add a switch in there for the condition and you now got hyper triggers that you can toggle on and off. However I still belive there is no reason to have toggleable hyper triggers, but I don't really want to get into that.
Report, edit, etc...Posted by yoni45 on 2006-05-09 at 23:49:35
QUOTE((U)Bolt_Head @ May 9 2006, 06:44 PM)
It seems accoring to what I read you are jumping to conclusions.  You decided that condidtions checking units cause lag when there are alot of other factors involved.  The way you have your note written, that would technaclly be true with any operation in starcraft or with computers in general.


Yes, but the extent to which that's true can vary greatly. I was under the impression that triggers that don't run but simply constantly check conditions use up minimal resources, to the point that you can have as many as you want running with hyper triggers with no visible effect on gameplay.

Turns out this is not the case, and the effect can be visible.

What also may not be known, is that the number of units on the map directly compounds with the conditions. My best guess is this only applies to conditions that check for units.

QUOTE
All you have proved is that you have a trigger or trigger that when when it runs 12 times a second then it lags.  Then you decided with no reasoing that it was the conditions that check units ignoring all other actions and conditions in your map.


And no, I did not "decide that condidtions checking units cause lag when there are alot of other factors involved". After looking through all other triggers to make sure that they couldn't cause lag in any way known to me, I thought one possibility would be the number of triggers on the map with conditions that relate to units and the frequency with which they run. This is due to the fact that the lag would get bad only as the number of units on the map went up, and would dissappear when those units are gone.

Before having made the statement you're ever so against, I found a way to make hyper triggers run only when I need them, and lo and behold, when hyper triggers were not running, the lag went away. This would show my previous assumption as correct.

If you can think of some other factors I did not take into account however, I'll gladly look at them.


QUOTE
Anyways to address to your orignal question.  Standard hyper triggers cannot be turned off easly simply because there designed to continue fireing for long amounts of time.  If you did alot of testing you would find out if you had less waits in each of the hyper triggers then it would take less time to turn them off.  In addition although it would take less time you would require more to keep the hyper effect going when it is turned on.

The best solution is to use the two triggers mentioned in Dabbu's tutorial at the very end.  Add a switch in there for the condition and you now got hyper triggers that you can toggle on and off.  However I still belive there is no reason to have toggleable hyper triggers, but I don't really want to get into that.
[right][snapback]483271[/snapback][/right]


Thank you. If you had read the entire post on which you're commenting, you'd have seen I've already found a method for achieving my desired actions by calculating the exact hyper triggers i need for different operations and having multiple sets to adress each of them.
Report, edit, etc...Posted by (U)Bolt_Head on 2006-05-11 at 02:54:57
Ok I guess what I should say is it appears you didn't actually test if it was specifically those triggers or even the conditions, you just noted that lag occured when hyper triggers were activated. I have no doubt that it stopped lagging when you stopped using hyper triggers.

If your finding is correct you should be able to create a map with just a hyper trigger and a trigger to check units on the map to create massive lag.

The triggers would need to have nothing for the actions, (comments). It may be needed to copy the trigger and to restate the condition using differant values and/or refering to differant areas of the map. And you may decide to place a bunch of units on the map but you would have to check to make sure it wasn't enouth to make it lag even without hyper triggers.

QUOTE(yoni45 @ May 9 2006, 10:49 PM)
Thank you. If you had read the entire post on which you're commenting, you'd have seen I've already found a method for achieving my desired actions by calculating the exact hyper triggers i need for different operations and having multiple sets to adress each of them.
[right][snapback]483460[/snapback][/right]


Actually I did read the entire post, I was just elaborating on you sucess. I was hopeing to make it clear that using less waits per hyper trigger allowed for hypers to be shut off quicker but had a negitive effect on the longtivity of the hyper's effect while activated.

What I suggested would have an instant off and there wouldn't be any negitive effect on the trigger while active.
Report, edit, etc...Posted by yoni45 on 2006-05-11 at 13:34:48
QUOTE((U)Bolt_Head @ May 11 2006, 12:54 AM)
Ok I guess what I should say is it appears you didn't actually test if it was specifically those triggers or even the conditions, you just noted that lag occured when hyper triggers were activated.  I have no doubt that it stopped lagging when you stopped using hyper triggers.

If your finding is correct you should be able to create a map with just a hyper trigger and a trigger to check units on the map to create massive lag.

The triggers would need to have nothing for the actions, (comments).  It may be needed to copy the trigger and to restate the condition using differant values and/or refering to differant areas of the map.  And you may decide to place a bunch of units on the map but you would have to check to make sure it wasn't enouth to make it lag even without hyper triggers.
Actually I did read the entire post, I was just elaborating on you sucess.  I was hopeing to make it clear that using less waits per hyper trigger allowed for hypers to be shut off quicker but had a negitive effect on the longtivity of the hyper's effect while activated.

What I suggested would have an instant off and there wouldn't be any negitive effect on the trigger while active.
[right][snapback]484222[/snapback][/right]


Well, I also had a huge amount of conditions on the map. I doubt 1 trigger hypered would cause lag, but hundreds of them likely would... either way, thats also easily testable...

As for the suggestion, that's fair enough heh, what I ended up doing tho is having 2 blocks of hyper triggers, 1 of which turns on at start and turns off 8.4 seconds later (having a small amount of waits in it), and another one based on a switch that only turns on later in the game when i need it, with 3 sets of 63...
Next Page (1)