Keyboard movement and regions

Started by Montague, Tue 23/01/2007 07:28:56

Previous topic - Next topic

Montague

Hey people

I'm fooling around with a game that uses keyboard movement (the module), and I have a problem with regions triggering scripted events. I want to have a little cutscene when the player walks onto a region, but the keyboard movement seems to cancel them. Any ideas?

EDIT: Oh, and another thing: I have disabled all standard cursors except Interact, and I don't want to use right click to toggle modes. But I do want the look mode to be available on inventory only (I use the standard/demo Inventory GUI). How do I do that? The look-button on the GUI showed up disabled at first, then I managed to enable it, but it still won't change cursor mode when I click it.
A child of five would understand this. Send someone to fetch a child of five.

Akatosh

Quote from: Montague on Tue 23/01/2007 07:28:56
I'm fooling around with a game that uses keyboard movement (the module), and I have a problem with regions triggering scripted events. I want to have a little cutscene when the player walks onto a region, but the keyboard movement seems to cancel them. Any ideas?

That's strange. What is the exact code of your movement and the cutscene?

Quote from: Montague on Tue 23/01/2007 07:28:56
EDIT: Oh, and another thing: I have disabled all standard cursors except Interact, and I don't want to use right click to toggle modes. But I do want the look mode to be available on inventory only (I use the standard/demo Inventory GUI). How do I do that? The look-button on the GUI showed up disabled at first, then I managed to enable it, but it still won't change cursor mode when I click it.

Again, what's your code? Does the look-button really just do "mouse.Mode=eModeLookat;"? I guess you left the "override to look like the pointer" code in accidently and just thought the cursor wouldn't change...

Ashen

#2
Akatosh posted while I was typing, but still:

Have you tried the cutscenes using Mouse control, just to be sure it IS keyboard movement causing the trouble? It's possible that the keys are somehow skipping the cutscene - the most obvious thing would be if you were using StartCutscene with the eSkipAnyKey parameter -  could you show us an example of the code you're trying to run? (And also how you're handleing the movement code.)

For the second question, have you re-enabled eModeLookat before opening the Inventory GUI? Try adding mouse.EnableMode(eModeLookat); to the show_inventory_window function in the Global Script. You'll also need to disable it again, and change the mode back to Interact (mouse.DisableMode(eModeLookat); mouse.Mode = eModeInteract;) when you turn the GUI off.
Alternatively, if you've removed the 'Right-Click changes mode' bit from on_mouse_click and any other way for the player to change mode (GUIs, etc), you should be able to leave the other modes enabled and just change to them when you want. (Don't forget to change back afterwards, though.)
(Note: the 'override to look like the pointer" code' is canceled when you change mode, so if it HAD changed to eModeLookat, the cursor WOULD change. Unless you had that code in rep_ex_always, for some wierd reason.)
I know what you're thinking ... Don't think that.

Montague

Thanks for the responses,  both problems solved. For the scripted events I idiscovered that it merely cancelled speech (which I previously interpreted as cancelling all events since, hey, they were mainly speech), and then found out I had set the setSkipSpeech to 3 which wasn't a great idea; and what you said about the inventory did the trick.
A child of five would understand this. Send someone to fetch a child of five.

SMF spam blocked by CleanTalk