Help on creating turn counter

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Post Reply
explorer2
Posts: 468
Joined: Thu Nov 29, 2007 10:45 pm

Help on creating turn counter

Post by explorer2 »

I need to have a way of triggering an event x turns after another event has been triggered, but the date of it is not fixed, just the amount of time from another event (Eastern Blitz)

In WaW, I want to make it so that a result of the Eastern Blitz card being played, a combat bonus for the Germans is changed x turns after it is given.
Current change: ExecChangePeopleCombatModVS (0, 3, 50)

I've read the tutorials on events and variables many times, but as one who has never programmed and new to modding, I just don't get it.
Any help, ideally with an example, GREATLY appreciated.
Lunaticus_matrixforum
Posts: 834
Joined: Wed Dec 31, 2008 3:50 pm
Location: Germany

RE: Help on creating turn counter

Post by Lunaticus_matrixforum »

Hello,
am I correct in assuming that you mean that an event should happen x rounds after the other (1 round means each regime gets to act one turn).
I think the easiest way then might be to use a gamevar to store the round and another event to check the difference. This might then look like
1. Step In the pt2 file use settings to set gamevar0 to -x-1 (i.e. if the difference in rounds you want is 4 set it to -5)
2. Step
Event 1 (this is the triggering event)
add some line like (maybe not 100% syntactically but close):
setvar gamevar0 = checkround
3. This event should be triggered
Event 2 (must be a roundcheck event)
setvar tempvar0 = checkround
setvar tempvar0 - gamevar0
Check tempvar0 = <number of rounds of delta you like>
Things happen here
Endcheck

I think this should do it. Would be similar for turns but this would mean you would like to use something calculated on playing order. If you want to have it mixed it might also be possible but more complicated.
Good Luck,
Lunaticus
Post Reply

Return to “Mods and Scenarios”