Actor Goes Out of Scene


  • Posts: 60
Alright so lets refer to the actor I'm having a problem with as actor 1 and the actor that has no problems as actor 2

I've been using this code to keep actor 1 in a scene:
if x < 0
set x to 0 for self
if x of self > scene width (pixels) - width of self
set x to scene width (pixels) - width of self
For some reason it works for when the actor's x < 0 but not for when the actor is out of bounds on the other side of the scene. I have this exact code for actor 2 and it works for them. Any idea as to why actor 1 is not working with me?