Little exercice : create a cycle
Posted: Mon Feb 09, 2009 2:06 pm
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
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