Grrrrr. Where is the "SnapTo" attribute? More Joystick tutorial confusion
design219
Member Posts: 2,273
I've been fighting all day with the joystick demo with no luck. I was copying from the template, but can't get it to work. And yes, I made sure all the "otherwise" were set.
I'm starting again by manually putting in everything in the tutorial, but I can't fine when I get to the change attribute "self.SnapTo" I'm not finding that attribute anywhere.
Am I just missing something obvious?
Thanks.
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
I'm starting again by manually putting in everything in the tutorial, but I can't fine when I get to the change attribute "self.SnapTo" I'm not finding that attribute anywhere.
Am I just missing something obvious?
Thanks.
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
Comments
By the way, make sure to check EVERYTHING in that demo, it's such a pain to copy, as i found out the other day. Watch out for the otherwise sections of rules as well, they always get me
Thanks guys.
So, it seem this tutorial is a bit incomplete? I didn't think I needed any of the multi touch parts in the template. I just need a single stick control to move my actor.
Thanks.
Do I need the multi-touch parts in the files for a single stick?
I didn't even know that there was a tutorial, I just learn it from the file, doubt i'd use a tutorial anyway as it would seem like I'm just copying a list and not really learning.
The multitouch points just have to be dragged into the scene if you want to then add things like fire buttons.
Your movable actor should already have a rule telling it that when game.StickGrabbed1=true to **constrain** to game.Angle.
You should add another to say that when game.StickGrabbed1=false to **change** to game.Angle.
So, it constrains when the stick is being moved. When it is let go of it quickly changes to the last angle and stays there. You may need to set a very tiny delay (0.05 secs) between letting go of the stick and it turning StickGrabbed1 to false.
Hope that makes sense.
Sorry to take advantage of the situation but let me see if you can answer my questions about this. First it will be great if you can elaborate in the distancefromcenter thing that you mentioned (I just made the joystick work thanks to you and I will love to take full advantage of it by knowing as much as possible).
My main question is: Let say that I want my moving actor to face either to the right or left, never up or down. If it move up,down it will continue be facing the last right or left direction. Obviously if it move in a diagonal direction it has to face the right or left depending on the direction.