Game Development Community

The mouse input cannot be passed into the engine

by Gu Lu · in General Discussion · 11/21/2007 (4:58 pm) · 5 replies

Hi,

I already finished the "GameOne" tutorial following the instructions given by GettingStarted.pdf. Everything runs well but only one problem still exists.
In the tutorial.base, the mouse cursor is only available when the game is in menu or editor, and it disappears when the mission is loaded, all mouse input are passed into the engine to control the camera. But in my GameOne, the mouse cursor doesn't disappear when the mission is started, so I cannot control the character to turn around. It seems all user input are handled & blocked by the GUI layer without passing into the engine.
What may be wrong to produce such a problem, please?
Any help or suggestion are welcome:)

About the author

Recent Threads


#1
11/21/2007 (7:21 pm)
This has happened to me a couple of times. not sure what causes it but if u put "noCursor = 1;" in the gui block it should go back to normal

like this

new GameTSCtrl(PlayGui) {
   canSaveDynamicFields = "0";
   Profile = "GuiContentProfile";
   HorizSizing = "right";
   VertSizing = "bottom";
   Position = "0 0";
   Extent = "800 600";
   MinExtent = "8 8";
   canSave = "1";
   Visible = "1";
   hovertime = "1000";
   applyFilterToChildren = "1";
   cameraZRot = "0";
   forceFOV = "0";
   nocursor = "1";
#2
11/21/2007 (7:42 pm)
It's odd that I didn't find such a gui block ( new GameTSCtrl(PlayGui) ) in my .mis file
#3
11/21/2007 (7:51 pm)
Oh I've got it, it's in playGui.gui

Thanks for your help:)
#4
11/21/2007 (8:49 pm)
For GUI's like this where you are sure you always need this set, it is a good trick to put it in the code section after the GUI definition in the file.

//--- OBJECT WRITE BEGIN ---
new GameTSCtrl(PlayGui) {
  
    // gui objects

};
//--- OBJECT WRITE END ---
PlayGui.noCursor="1";

This way it will always be there even if the GUI Editor turns off the noCursor flag in the gui definition section. (The GUI editor only makes changes between the two: //--- OBJECT
lines )

(Thanks to whoever first suggested this one!)
#5
11/21/2007 (9:53 pm)
Got it, thanks!