Not logged inOpenClonk Forum
Up Topic General / Feedback and Ideas / New Function: MousePosition()
- - By Pheenix [de] Date 2010-07-21 14:12
Hi I'm one of the two developers of Operation Rising Sun, which is a mod of Clonk Rage.
Now I am interested in continuing the development for Open Clonk.
It would be great if you could create a Function, that returns the Position of the Mousecursor, for example to let the clonk permantly follow the Cursor to look arround.

Thank you for reading
Reply
Parent - - By Sven2 [de] Date 2010-07-21 14:39
In OC, the last known mouse position can be retrieved by a call to

GetPlayerCursorPos(player_number)

The position is updated by any controls that have the SendCursorPos flag set. IT is *not* updated if no controls are issued.

If you want continuous updates independent of controls, register and enable a Mouse*Move control. For an example, see the Aim control in OC.

Documentation can be found here.
Parent - - By Pheenix [de] Date 2010-07-21 20:51 Edited 2010-07-21 20:56
Thank you very much.
If we start to develop for OC I will use it.
But wouldn't it be easier to implement a little function in addition to the use of Commands?
Reply
Parent - By Sven2 [de] Date 2010-07-21 22:15
No
Parent - By Isilkor Date 2010-07-22 08:33
To elaborate: The mouse position isn't transmitted at all outside of SendCursorPos controls, so the engine doesn't even have that info.
Reply
Parent - - By Newton [de] Date 2010-07-22 09:50
Is it already possible to have custom PlayerControl.txt in the System.c4g of scenarios?
Parent - By Sven2 [de] Date 2010-07-22 12:29
Yes. That's how the Paint scenario works.
Up Topic General / Feedback and Ideas / New Function: MousePosition()

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill