One Button to rule them all!


#1

Hi
I have a 2d lamp in my scene, and I want to “pointerdown” to turn it on, and “pointerdown” to turn it off. Just one button, which will be the glow, to have the two actions work on it.
How can I do this?

Thanks
Declan


#2

Hi Declan,

This Actions version of my Solar System Project is a great example of this - Mini Solar System - Actions.zpp (9.6 MB)

Essentially you cannot program logic using actions (if this then this else this) so the workaround is to create multiple ‘hotspots’ (planes) and turn them on/off as the result of an action.

Example

Two planes, one enabled one disabled.

Tap on the first plane, carry out the action and then disable the first plane and enable the second one.

Tap on the second plane, carry out the action and then disable the second plane and enable the first one.

Mark


#3

Hi Mark

Many thanks, I got this working.
Thanks for the demo.

Regards
Declan