I want the main character's behaviors change the end of the game. If he always steal items, talk impolitely and irresponsibly; the game will end bad.
Can it be?
Yes... script something like:
if (GetGlobalInt(200) < 100) {
NewRoom(201);
} else if (GetGlobalInt(200) < 130) {
NewRoom(202);
} else {
NewRoom(200);
}
This checks GlobalInt 200, which you can change during game with SetGlobalInt(200,newval); is under the given number, in order (so if between 100 and 130 the middle command is run).The game will go to specified room. In the rooms "Player enter screen" room interaction events you can set what happens. The GlobalInt and room numbers are just examples, so modify it to suit your need.
Thanx. But I want to ask you one more thing: Are 200, 130, 100 scores?
In TK's example, you would use global integer #200 to store the score data. However, this can also be done by accessing the normal game.score variable like this:
if (game.score < 100) {
NewRoom(201);
} else if (game.score < 130) {
NewRoom(202);
} else {
NewRoom(200);
}
You can find a lot of interesting variables in the "text script global variables" section of the manual.
Thanks :)