Hover-Over scripting

About advanced scenes, and the Thyme scripting language used in Algodoo.

Hover-Over scripting

Postby PHUNGL » Wed Oct 09, 2013 3:56 am

Is there any way for a hover over script? I mean like, if your mouse hovers over the scripted polygon, it would change a scene.my variable. Is there even such a script? :arrow: :?
Phun was the best program I've ever used. That is, before I discovered Algodoo.
User avatar
PHUNGL
 
Posts: 6
Joined: Mon Sep 09, 2013 2:49 am
Location: US

Re: Hover-Over scripting

Postby Xray » Sun Oct 13, 2013 3:14 am

Check this out: MOUSE OVER EFFECTS
User avatar
Xray
 
Posts: 501
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Hover-Over scripting

Postby PHUNGL » Sun Oct 13, 2013 6:21 am

Slightly what I was looking for...

But how do I alter the code to change a scene.my variable rather than a color tamper? :?
Phun was the best program I've ever used. That is, before I discovered Algodoo.
User avatar
PHUNGL
 
Posts: 6
Joined: Mon Sep 09, 2013 2:49 am
Location: US

Re: Hover-Over scripting

Postby Xray » Sun Oct 13, 2013 7:53 am

_mouseOverCircle and _mouseOverBox return TRUE when the mouse cursor is over the geometry. So, for example, your script could be:

_mouseOverCircle ? {scene.my.variable = value}:{}

It works just like any other Boolean (true/false) variable or function.

Does this help?
User avatar
Xray
 
Posts: 501
Joined: Sun Jun 17, 2012 6:12 am
Location: USA


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 3 guests