Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Hyper triggers and wait actions
Hyper triggers and wait actions
Apr 21 2008, 6:27 am
By: kansasjayhawks  

Apr 21 2008, 6:27 am kansasjayhawks Post #1



Hi all, I'm new here but I've been lurking around these forums for about 2 months now. I need some help and believe me I looked at all other available options but I'm at a lost here.

I'm creating a map that requires hyper triggers. The problem is all of the players currently use wait actions. I was reading the wiki and I found out I can use death counters to well counter this conundrum. When I looked at the death counters wiki I was confused and lost.

The question I am asking is what is a way to use hyper triggers on a player with wait actions, and if I have to use death counters can someone give me a clear step by step? I would be extremely grateful.

Many thanks.



None.

Apr 21 2008, 7:18 am NudeRaider Post #2

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

First of all you should replace waits with death counters. They don't produce wait blocks and are independent from speed (important in single player). If you manage to get rid of the waits for one player then you can use method a) described below.

Setting up hyper triggers is very easy: Create a trigger that has a preserve, maybe a comment and the rest of the actions (max. 64) only waits. Then copy this trigger 2-3 times. And that's all, your hypers are ready to go.

Now there are several methods how to avoid wait blocks:
a) Place the hypers under one player that has no other waits

b) Place the hypers under all players and put them at the bottom of the trigger list, which is automatically done if you create them last. This method only creates wait blocks if all players are executing a wait the same time.

c) Uses other triggers (switch hypers) spread among 2 players. These players also should not execute other waits, BUT the wait block is very short (usually negligible). The hypers are simply turned off while the wait is running (regular 2s trigger checks). You can also add another switch into both hyper's condition to switch them off manually. This will happen instantly as opposed to regular hypers which will need a minute or so to turn off.




Apr 21 2008, 1:06 pm Falkoner Post #3



Yes, the wiki tends to be confusing when people start mapping, one reason why I wrote my own tutorials, here's the tutorials on Death Counts and Hyper Triggers. Those are much simpler than the other tutorials, although there is still advanced information in them, if you don't understand something, just ignore it, you'll still get the general concept.



None.

Apr 21 2008, 4:09 pm NudeRaider Post #4

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

Lol I already linked hom to your death counters tutorial, just that here on SEN it has a nice introductionary sentence.
Also you should update your hyper trigger tutorial to explain how to use hypers under all players instead of calling it a bad idea.
But thx for removing the background. :P




Apr 21 2008, 9:47 pm Falkoner Post #5



I already say something about that:
Quote
They will also cause Wait Blocks, slowing down other Waits for the same player that they are in although it is possible to stop them from giving wait blocks and to just turn off during other waits, just use SCM Draft and move them to the bottom of the list

But I definitely need to go a little more thorough into it, since when I made it I just knew that you could stop the blocks, I thought it had a slight delay before stopping though.



None.

Apr 23 2008, 8:05 pm kansasjayhawks Post #6



I just need some conformation. I want all players to have hyper triggers but you said I need to get rid of the waits using death counters. Right now I have this

Quote
Trigger("Player 1"){
Conditions:
Switch("RedStarting", set);
Command("Current Player", "Terran Firebat", Exactly, 0);

Actions:
Kill Unit("Player 1", "Terran Firebat");
Set Switch("RedStarting", clear);
Display Text Message(Always Display, "\x004You lost a life!\r\n\x006\x0134 lives remaining.");
Set Score("Current Player", Subtract, 1, Custom);
Wait(1500);
Set Switch("Red4thLife", set);
}

What would I need to do?



None.

Apr 23 2008, 9:05 pm Wormer Post #7



Quote
I want all players to have hyper triggers but you said I need to get rid of the waits using death counters.
Having hyper triggers for only one (any) player remaining in the game is enough. Triggers would execute faster for all players even if hyper triggers are placed only for one of them.

I have a question to you, why do you put the action Kill Unit("Player 1", "Terran Firebat") under the condition Command("Current Player", "Terran Firebat", Exactly, 0)? Player 1 always owns exactly 0 firebats when the condition is met.

You can make a wait using death counter ("Rhynadon" unit, I suppose it cannot be killed in your map) like this:
Code
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Rhynadon", Exactly, 1);
Actions:
Preserve trigger();
Set Switch("Red4thLife", set);
}

Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Rhynadon", At least, 1);
Actions:
Preserve trigger();
Set Deaths("Current Player", "Rhynadon", Substract, 1);
}

Trigger("Player 1"){
Conditions:
Switch("RedStarting", set);
Command("Current Player", "Terran Firebat", Exactly, 0);

Actions:
// ??? Kill Unit("Player 1", "Terran Firebat");
Set Switch("RedStarting", clear);
Display Text Message(Always Display, "\x004You lost a life!\r\n\x006\x0134 lives remaining.");
Set Score("Current Player", Subtract, 1, Custom);
Set Deaths("Current Player", "Rhynadon", Set To, round(1500/84)+1);
}


I will explain the expression round(1500/84)+1 (SCMD dont allow expressions so you should manually calculate it).
Hypper triggers cicles repeat every 84ms. +1 is because you execute your action (Set Switch("Red4thLife", set)) when the counter is 1, but not 0. This is made to make your first two triggers reuseable. This means that setting deaths of Rhynadon to some (probably other) value in another trigger will automatically start the timer which would execute the Set Switch("Red4thLife", set) action every time it reaches 1.

Post has been edited 1 time(s), last time on Apr 23 2008, 9:12 pm by Wormer.



Some.

Apr 23 2008, 9:23 pm Falkoner Post #8



You can also make the hypertriggers under All Players, and then make sure it is at the bottom of the trigger list, in that case, your waits will all run normally, but they will temporarily shut off the hypers for that player until they are done, putting it under All Players insures that only if every single player present in the game executes a wait at the same time(Or a wait under All Players) will the hypertriggers actually stop running.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[05:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[05:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[03:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
[12:51 am]
Oh_Man -- definitely EUD
[09:35 pm]
Vrael -- I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
[09:35 pm]
Vrael -- that is insane
[09:35 pm]
Vrael -- damn is that all EUD effects?
[2024-5-04. : 10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
Please log in to shout.


Members Online: NudeRaider