User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

counter/register

Tue Nov 05, 2013 7:04 pm

Hi folks, can anyone remind me how I set up a counter that I can increment each turn. When it reaches a certain value I can fire an event - I know there is
a way of doing this!

Thanks,
Chris

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Tue Nov 05, 2013 7:49 pm

Hi

I think the easier way is to create an event (ex: "evt_counter") that can occur 999 times, without conditions or actions. This event will happen each turn.

Then the event you want to fire, located below the one above, would have in it's conditions evt_counter = X, or the number of turns you want.

But, if you want just an event that fires at "x" number of turns of a game, why not use just the date you want it to happen in conditions ?
[SIGPIC][/SIGPIC]

User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Tue Nov 05, 2013 8:42 pm

I'm really after a way of firing an event x turns after another random event has fired.

Thanks,
Chris

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Tue Nov 05, 2013 10:09 pm

So you need that the evt_counter is initially set to occur zero times. When the Random event fires, one if his Actions should be to set Maxoccurs of the evt_counter to 999. Then the counter will increase by one each turn.

Those counter events that are initially set to zero are usually placed at the beginning of the options, as they are thus processed before any dependent option or event.
[SIGPIC][/SIGPIC]

User avatar
Hobbes
Posts: 4437
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Wed Nov 06, 2013 8:26 am

Many thanks Franciscus!

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 8 guests