Cannot get a button / actor on the stage despite having it placed in the editor

jimm84

  • Posts: 31
Hello, I was hoping someone would be able me as I'm now banging my head against the wall.

I have dragged an actor onto the scene onto the top layer to act as a HUD / menu button when clicked. In the editor this button is visible but when I come to test they vanish. There must be something I'm missing... or a bug. Here are some more details:

  • The actor is a png file
  • The I have removed the physics
  • I have set it to loop
  • It's on the top layer
  • The actor has a basic bevaiour, "when clicked" -I have disabled this behavior yet my actor is still invisible..

Any clues? Thanks for your help (I hope this question isn't as silly as where did I leave my glasses) 8)

JeffreyDriver

  • Posts: 2262
Have you set the physics for the actor to "cannot move"?

If it's just a button and doesn't need to collide with anything else, also try removing it's collision shape. It may be that it's colliding with something and getting knocked off screen.

jimm84

  • Posts: 31
Thanks, still no luck. Any other ideas? It is such a weird thing!

JeffreyDriver

  • Posts: 2262
Ok, when weird stuff happens in Stencyl for me, I do some problem solving. I'd create two global number booleans to check the X and Y value of the button and draw these values to the scene so can check where it is. You can also use the "for each actor of type" to check that it exists in the scene.

Just check though, there's no code changing the opacity?

jimm84

  • Posts: 31
I will have to check on the opacity. I would like to think its something obvious and not a bug or something.

I must confess, I'm not very well versed on working with the global booleans yet, Ive worked and standard boolean... - hang on do you mean as standard variable/ boolean true and false?

Cheers,

JeffreyDriver

  • Posts: 2262
Sorry, I meant number ATTRIBUTES, not booleans. One for the X value, one for the Y, then use 'draw text' block under 'drawing' to simply write these values on screen so you can check where the actor is.