nuxil 2 Posted March 24, 2008 i need to know if my mouse has moved. i have no idea how i can do this,, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> for [{_i=1},{_i<1000},{_i=_i+1}] do { Â _display_i = findDisplay _i; Â _display_i displaySetEventHandler ["MouseMoving","hint format[""%1"",_this]"]; }; if i Change MouseMoving to KeyUp or KeyDown it finds display 46 and button code.. any ideas on howto find out if my mouse has been moved? Share this post Link to post Share on other sites
nuxil 2 Posted March 24, 2008 maybe i need to be more clearly on this one.. im making a arcade air mission wher you get rankup & upgrades to your aircraft as you score more and more points. now one of the upgraded is something i called AFC Advanced flight control: Â all the keys has been done. i now need to finish mouse controles as well.. this is where my problems start. i assumed displaySetEventHandler worked with "mouse" Handernames.. because they are listed in the User Interface Event Handlers list.. linked by ctrlSetEventHandler which i assume work like something like displaySetEventHandler Some of the Handlernames: onMouseButtonDown onMouseButtonUp onMouseButtonDown onMouseButtonClick onMouseButtonDblClick onMouseMoving i tried all of thouse but cant get it to work.. with and without the "on" Â part i also tried with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _display_i ctrlSetEventHandler ["onMouseMoving","hint format[""%1"",_this]"]; but didnt do any diffrance.. someone please help! Share this post Link to post Share on other sites
dr_eyeball 16 Posted March 25, 2008 Checking BIKI User_Interface_Event_Handlers shows that the scope of MouseMoving is limited to a 'control' (see last column). So I'm not sure if it's even possible at a display level. The event lists is a combined display/control list, which is a little confusing. That's correct, you don't need the "on" prefix for UI event names. (Problably just a typo or reusing variables, but in your last example, you are using a display not a control with ctrlSetEventHandler.) Share this post Link to post Share on other sites
nuxil 2 Posted March 25, 2008 Dr_Eyeball if you look closer. you aslo see that onKeyDown & onKeyDown has control as its scope. thouse work fine. "without on part" onMouseButtonDown & onMouseButtonUp should then in teory work the same way. But Thats not the case. so i am verry confused atm. what i need is onMouseMoving. but i am starting to belive that i need some kind of display"dialog" for it.. forexample HALO PARACHUTING SCRIPT they are using a mousetracker on a dialog. i guess its possible to return the X & Y cords inside the dialog. but i dont want to add a dialiog with a mousepointer in my cockpit. that would be stupid.. i just need to know if there has been changes in the X & Y axis on the mouse. any ideas or workarounds would be nice. Share this post Link to post Share on other sites