Question question
by Michael S · in Torque Game Builder · 10/20/2006 (6:05 pm) · 2 replies
I make a mouse based games , if i move my mouse so do my player .
but if i move my mouse outside the window my player freeze
so i want to lock my mouse in window
how do i lock my mouse so my mouse kept in my window it
i've tried
function startGame(%level)
{exec("./level.cs");
exec("./player.cs");
Canvas.setContent(mainscreenGui);
Canvas.setCursor(DefaultCursor);
// Canvas.hideCursor();
moveMap.push();
sceneWindow2D.setUseObjectMouseEvents( true );
if( isFile( %level ) || isFile( %level @ ".dso"))
sceneWindow2D.loadLevel(%level);
scenewindow2d.setviewlimiton(-100,-75,220,150);
scenewindow2d.mount(myplayer,0,0,1,false); ===> i've tried this
scenewindow2d.setlockmouse(true); =====> and this
lockMouse(true);
}
but it didn't work
any solutions ?
but if i move my mouse outside the window my player freeze
so i want to lock my mouse in window
how do i lock my mouse so my mouse kept in my window it
i've tried
function startGame(%level)
{exec("./level.cs");
exec("./player.cs");
Canvas.setContent(mainscreenGui);
Canvas.setCursor(DefaultCursor);
// Canvas.hideCursor();
moveMap.push();
sceneWindow2D.setUseObjectMouseEvents( true );
if( isFile( %level ) || isFile( %level @ ".dso"))
sceneWindow2D.loadLevel(%level);
scenewindow2d.setviewlimiton(-100,-75,220,150);
scenewindow2d.mount(myplayer,0,0,1,false); ===> i've tried this
scenewindow2d.setlockmouse(true); =====> and this
lockMouse(true);
}
but it didn't work
any solutions ?
Torque Owner Nir Ziso
Default Studio Name
torque is behave like this all the time look at this thread
www.garagegames.com/mg/forums/result.thread.php?qt=51213
i did not find away to let the game running while the user drag the window or the window lost focus
so if you can find how to do it i will be very glad to get the solution