Change Size
ktorti
Member Posts: 27
Hello all, I've been working on an app, and I'm nearly finished but have one last problem!
Basically, when my character jumps you have the ability to change size by pressing the up and down keys; up is small, down is large. But I can't figure out how to cycle through the sizes, small, large, and original. Right now when I press up, my character becomes small, and when I press down it gets big, but I can't get it to cycle through the different sizes.
Any advice would be appreciated!
Basically, when my character jumps you have the ability to change size by pressing the up and down keys; up is small, down is large. But I can't figure out how to cycle through the sizes, small, large, and original. Right now when I press up, my character becomes small, and when I press down it gets big, but I can't get it to cycle through the different sizes.
Any advice would be appreciated!
Comments
Rule#1 If self.height is 100 (saying that the original height is 100) and button up arrow is pressed, then change attribute self.height to 150.
Rule #2 if self.height is 150 and button up arrow is pressed, then change attribute self.height to 50.
Rule #3 if self.height is 50 and button up arrow is pressed, then change attribute self.height to 100 (back to original height).
Then you can do the same thing for the down arrow, switching it around in whichever order you would like.
Good luck on your app!
Josh
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio
Right now I have 4 rules:
1. when height is 50 and key up > change height to 25 change width to 15
2. when height is 25 and key down > change height to 50 change width to 30
3. when height is 50 and key down > change height to 100 change width to 60
4. when height is 100 and key up > change height to 50 change width to 30
Okay so, right now it starts at 50hx30w. When I press up the size changes to 25x15. When I press down from the original size the size changes to 100x60. But when I press down from the smallest it goes directly to the largest. It can't seem to make it go from small, to medium, to large or vice versa without it jumping directly between the smallest and largest
Right now I have 4 rules:
1. when height is 50 and key up pressed > change height to 25 change width to 15
2. when height is 25 and key down pressed > change height to 50 change width to 30
3. when height is 50 and key down pressed> change height to 100 change width to 60
4. when height is 100 and key up pressed > change height to 50 change width to 30
What can I do to be able to be able to key between each size without going in a circle between sizes? Imagine a character traveling on the z plane moving further and closer to you.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Try, when height = 50 and key up pressed, change height to 25 change width to 15 etc...
AppTaco LLC
http://www.apptacostudio.com/
https://www.facebook.com/apptacostudio