Hello
I am using the code bellow (in global script - repeatedly execute) to change the cursor mode when a certain key is down, which works. However when in say look mode, if the character looks at a hot spot, the message it is supposed to display only appears for a mili secound.
The code and message works whe the last line of code is removed but then once say, look mode is activated, it obviously stays in look mode and wont revert back.
Is repeatedly execute the right place or is there a better way of writing this?
if (IsKeyPressed(76) == 1) {
SetCursorMode(1);//set to mode look
}
else if (IsKeyPressed(84) == 1) {
SetCursorMode(3); // set to mode TALK
}
else if (IsKeyPressed(85) == 1) {
SetCursorMode(2); //set to mode USE
}
else SetCursorMode(0); //set to mode walk
thanks
I think the problem is that, by default, pressing a key (or, in this case, a key already being pressed) skips Display/DisplaySpeech() commands, hence the message vanishing more or less as soon as it appears.
If this is the problem, you'll probably need to play with the SetSkipSpeech () command, and the game.skip_display variable. Look them up in the manual for more details.
yes that worls fine
in fact you can change the speech skip from general settings and that also works
thanks
Heh, I'm so used to playing around with scripting, I didn't even think about doing it that way. Does that change the skip Display settings as well, or do you not need that?
no dont need it, thanks for yuor help, am leaving the skip option just on the mouse now, makes sense