Not logged inOpenClonk Forum
Up Topic General / Help and Questions / Control Use
- - By vagner Date 2015-08-30 15:22
When I press the mouse button, the function Control Use start.

Is it possible to know if the Control Use function have start after the right or left mouse click?

I want do somethinng like it::

func ControlUse()
if(Right mouse click) CreateObject(Rock);
if(Left Mouse Click) CreateObjct(Gold);

Can someone help me?
Parent - - By Sven2 [us] Date 2015-08-30 16:23
I think the left/right controls will be abolished in the future anyway.

I guess that will also make the throw-control overloadable to allow two functions on an object?
Parent - By Zapper [de] Date 2015-08-30 16:37

>I guess that will also make the throw-control overloadable to allow two functions on an object?


Meh, I hope we won't have that in the original pack.
Parent - - By vagner Date 2015-08-30 16:44
I want to do a two-handed weapon.
http://prntscr.com/8amhjn

What is the plan for future? How the control will be?
Parent - By Zapper [de] Date 2015-09-02 09:28

>What is the plan for future? How the control will be?


Sorry that I answer so late:
Probably in the next version, you will only have one hand that you can use with left-click and throw with right-click. Theoretically that would allow items to have a secondary function instead of throwing, but that's not implemented yet
Parent - - By Zapper [de] Date 2015-08-30 16:36
Currently you have two different items in your hand (for example a shield in the left hand and a sword in the right hand). So right click would be the other item then.
I don't think you can redirect both keys to one item at the moment.
Parent - By vagner Date 2015-08-30 16:50 Edited 2015-08-30 16:59
I want to do a two-handed weapon.
http://prntscr.com/8amhjn

If you carry a Barril, the game redirect both keys to one item.
- By vagner [br] Date 2015-09-01 03:55
Thanks for the reply, but i solved the problem.
I changed the ControlUse2Script. Now the ControlUse will return four values:
ControlUse(Object, int x, int y, int z)
If z = 0, the ControlUse was fired by a mouse left click.
If z = 1, the ControlUse was fired by a mouse right click.
Up Topic General / Help and Questions / Control Use

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill