Posted By: Reconnoiter
touchscreen / tap lite-c code tip - 09/25/16 21:57
Quick tip if you want to mess around with touchscreen in lite-c code (so not using windows functions):
do a wait(1); before doing your actions that use the mouse cursor pos (like e.g. creating an entity at mouse cursor position on mouse_left / double tap), cause otherwise the position of the tap is not yet updated in Gamestudio3d but the action is done. Waiting 1 frame gives the new mouse cursor position. In most cases this shouldn't give any noticeable lag.
Happy dirty Acknexing!
do a wait(1); before doing your actions that use the mouse cursor pos (like e.g. creating an entity at mouse cursor position on mouse_left / double tap), cause otherwise the position of the tap is not yet updated in Gamestudio3d but the action is done. Waiting 1 frame gives the new mouse cursor position. In most cases this shouldn't give any noticeable lag.
Happy dirty Acknexing!