newbie question
![jimp74](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
hi I have an element that can be draged in the scene set up as follows
actor receives event -touch- is pressed
constrain* attribute: self.position.Y = game.touches 1.Y
otherwise* Move to position 170 150 relative to scene.
this works when its the only scene but if I add a menu scene and then have a button change scene to the one with this action
the actor just sinks of the bottum of screen.
is there something obvious I can try.
cheers
Jim
actor receives event -touch- is pressed
constrain* attribute: self.position.Y = game.touches 1.Y
otherwise* Move to position 170 150 relative to scene.
this works when its the only scene but if I add a menu scene and then have a button change scene to the one with this action
the actor just sinks of the bottum of screen.
is there something obvious I can try.
cheers
Jim
Best Answer
-
gyroscope I am here.Posts: 6,598
I see, I thought you were on iPad size. :-)
If its drifting off screen then you either must have another movement-type behaviour affecting it somewhere, or the scene gravity is not at zero...""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
@jimp74
Hi Jim
My guess is the actor is moving to 170/150 as you asked it too without a touch pressed...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
P.S. thanks again Gyroscope.
You're welcome. :-)
Yes, from what I can gather from your Rules you've put, when there is no touch, the actor is moving to 170,150 (as asked for in the rule in your Otherwise section). So as soon as you enter the scene, and there's no touch happening, your actor will move to its new position.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
in fact when there is no touch the actor going to 170,150 is what I was hoping would happen.
either 170,150 isn't on the screen or something else is effecting my actors position...
I'm not at home so can't check but I'm wondering now if I have gravity or something going on.
cheers guys
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I'll post back later when I've had a chance to check things out.
I think I'm going to like it here.
I put the constrain attributes in a rule and the move attributes nested in a timer inside otherwise.
fixed my issue.
Thanks again