Little exercice : create a cycle

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

Moderator: Vic

Post Reply
User avatar
welk
Posts: 1199
Joined: Sun Sep 17, 2006 6:41 pm
Location: France

Little exercice : create a cycle

Post by welk »

As newbie, I am trying to do exercices with the event system.
I have tried to create myself a season cycle, but I have to verify if it works... No sure[:D] English is not my langage and try to learn with documentation is not so easy.


Gameslot :

season_duration = 0
current_season = 0

n = the cycle I want to have for seasons (2 seasons, one good, one bad) : it may be from 2 to ...n

Script event :


Checkround==checkround (I have included all my events in a false event, always verified, to be sure of the order of examination by AI)

---check current_season == 0

------Check gameslot season_duration < n + 1
------------set season_duration +1
------endcheck

------Check gameslot season_duration == n + 1
------------set current_season = 1
------------Set season_duration = 0
------end check

---endcheck



---check current_season == 1

------check gameslot season_duration < n + 1
------------set season_duration + 1

------endcheck

------check gameslot_season_duration == n + 1
------------set current_season = 0
------------Set season_duration = 0
------end check

---endcheck

---check current_season == 0
------------exe...(move or combat modifiers,etc.)
---endcheck

---check current_season == 1
------------exe......(move or combat modifiers,etc.)

---endcheck

endcheck
Post Reply

Return to “Mods and Scenarios”