showing something on/off

Started by Eleri, Mon 30/05/2011 17:21:52

Previous topic - Next topic

Eleri

Okie, so I have puzzle where certain buttons need to be pushed. I have the graphic with the buttons in their off state, I was assuming that to make the on state be noticeable, I need to make an object for each button, overlay it, and then have the hotspot toggle the object on/off.

That's the right way to do it? Or am I missing something that'll make it much easier?

TheRoger

That is how I'd do it, so I guess it's right. Also add code for object, if you want turn off it later.

Khris

You can skip the hotspots; instead of turning the object on/off, change its .Graphic.

Example:
Button on sprite: 32
Button off sprite: 33

Code: ags
oButton1_Interact() {
  oButton1.Graphic = 65 - oButton1.Graphic;
}[code]
[/code]

SMF spam blocked by CleanTalk