I need help with implementing a deathcount timer to allow for a small delay (500 milliseconds) after a certain event. I can't use a wait command as this ends up desyncing replays (this is for a stripped melle.trg btw) which are vital to the experience. The game itself doesn't suffer from wait blocks thnx to hypers and the fact that all players are running the same trigs, but the resulting replay does. So the trigs have since been "simplified" to avoid the need for waits. All were able to be removed... except for one:
For this particular event, a player is choosing some options that get carried throughout the game. These options are in the form of researching certain techs. Each choice transpires almost instantly (the train time is set to 1). There are 3 things to choose from 9 choices. Upon choosing your last option, the unit that presents these choices is then removed. The problem is that the hypers are so frickin fast, that sometimes this last choice doesn't get recorded before the unit is removed (the tech doesn't finish researching). I've found that I only need 500 milliseconds to pull this off and have tried to build a simple deathcount timer running independently, but can't seem to get it to work properly. Here is what I've tried:
Spoiler
Trigger("All players"){
Conditions:
... blah blah stop this counter once it is no longer needed.
Actions:
Set Deaths("Current Player", "Ruins", Subtract, 1);
Preserve Trigger();
Comment("Reduce dcount timer by 1");
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Accumulate("Current Player", At most, 0, ore and gas);
blah blah this is players first time reaching 0 ore and gas....
Actions:
Set Deaths("Current Player", "Ruins", Set To, 9);
Set Deaths("Current Player", "Independent Command Center", Set To, 1);
Comment("Player has selected a race and is human = add small ~ .75 second delay before removing DOC");
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Deaths("Player 1", "Ruins", At most, 0);
Deaths("Current Player", "Independent Command Center", At least, 1);
Actions:
Set Deaths("Current Player", "Independent Command Center", Set To, 0);
blah blah blah
Comment(".75s delay up. Initiate resources and remove restrictions Player has selected a race and is human");
}
//-----------------------------------------------------------------//
Conditions:
... blah blah stop this counter once it is no longer needed.
Actions:
Set Deaths("Current Player", "Ruins", Subtract, 1);
Preserve Trigger();
Comment("Reduce dcount timer by 1");
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Accumulate("Current Player", At most, 0, ore and gas);
blah blah this is players first time reaching 0 ore and gas....
Actions:
Set Deaths("Current Player", "Ruins", Set To, 9);
Set Deaths("Current Player", "Independent Command Center", Set To, 1);
Comment("Player has selected a race and is human = add small ~ .75 second delay before removing DOC");
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Deaths("Player 1", "Ruins", At most, 0);
Deaths("Current Player", "Independent Command Center", At least, 1);
Actions:
Set Deaths("Current Player", "Independent Command Center", Set To, 0);
blah blah blah
Comment(".75s delay up. Initiate resources and remove restrictions Player has selected a race and is human");
}
//-----------------------------------------------------------------//
I can build a non-modded test UMS to emulate this process as well if that would help.
>> I'll have to edit later as I don't see a bbcode help button in the editor for spoiler.
Edit: can't seem to find the bbcode help button for spoiler anywhere.. this place could use a shoutbox for shit like this!



