Hello, I am very very beginner and I want implement a game event driving system in my game.
ex)
gameloop
{
if(whichEventHappen = checkHasReachedPoint)
{
if(whichEventHappen != null)
changeGameState(EVENT_RUNNING,whichEventHappen)
}
//in the EVENT_RUNNING state, execute script in the list 'whichEventHappen' one by one. after all is done return to play state
But I found some problems.
1. I'm not sure swapping whole game state is good or bad :-( ( I learned by myself )
2. if I use a script like
MOVE hero RIGHT 100
I want it to move right direction for 100, but how can I distinguish the hero in the object list which contains many other objects?
If I want one of 3 goblins to move right, I have no idea how to pick just one of them.
I need help. I read http://www.gamedev.net/page/resources/_/technical/game-programming/game-programming-genesis-part-vii-developing-r1294 this article's 'Effect" part. It is similiar to what I want to know.
Is there any tutorials for this?
p.s sorry for my poor English.