Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Space Jump (http://www.alice.org/community/showthread.php?t=4885)

medinra 10-15-2010 07:14 PM

Hi debussybunny563
 
I am currently trying to achieve the same thing as Tommy and I watch your example , but it's does the spinning and jumping together and I have to do them with different amount. At the beggining it needs to ask which height i want the astrounaut to jump and the in should ask how many spins? . Based on what the user enters thats the amount the animation will do. I am really lost.

Doctor Who 10-15-2010 07:18 PM

Go to World -> Functions -> Ask User For Number. You can invent you own code from there.

medinra 10-15-2010 07:34 PM

thanks
 
thanks for the help,but this is what I am coming up with and is not working.

medinra 10-15-2010 08:11 PM

can someone help me????

Dameria 10-15-2010 08:54 PM

1 Attachment(s)
I saw what you did with all of the fancy animations that didn't work, and decided to just delete all of it. I started from scratch and made a really simple code that does the bare basics. If you want you can edit it so that there is more animation, like his legs moving to prepare for the jump, etc. Didn't want to do the whole project for you so just did the basics so you can see how it is done as simply as possible.

medinra 10-15-2010 10:54 PM

Awesome
 
Dameria you are really good, thanks for helping with these issue. What you did was really good. Just wanted to ask you, if I wanted for the astronaut to first jump and then do the spinning while it's already in the air, how can I achieve that?? thank you very much for your quick help.

jediaction 10-16-2010 08:38 AM

You can just put a turn 1 revolution. Or are you saying, just the first jump. I would do a variable with 1 or 0 or true or false. I would use 1 or 0 for this. Make the game start with the number 1. Then add the spin system in a true or false and say if you press the space bar or any button that is jump, make the variable for the spinning number go to 0 and it wont spin anymore because it will be reading the If/else and it should be blank

Dameria 10-16-2010 09:16 AM

1 Attachment(s)
[QUOTE=medinra;26774]Dameria you are really good, thanks for helping with these issue. What you did was really good. Just wanted to ask you, if I wanted for the astronaut to first jump and then do the spinning while it's already in the air, how can I achieve that?? thank you very much for your quick help.[/QUOTE]

Like this?

medinra 10-16-2010 09:53 AM

Excellent!!!!
 
Dameria that was exactly what I meant..... thank you very much for your help. Just out of curiosity, how did you achieved it? just to have a idea. Thanks I owe you one or a couple lol .:)

Dameria 10-16-2010 09:57 AM

I had 2 world number variables named "height" and "spin", and in the beginning of "my first method" I asked the user to enter the height, and assigned that to the "height" variable. Then I did the same thing, asked the user to enter the amount of spins, and assigned that to the "spin" variable. Then I simply told the astronaut to move up, and in the amount of meters to move up I dragged the variable "height" in there. That way he moves up the amount of height you previously entered. Then while right after that statement I told the astronaut to turn to the right "spin" times, so that he spins the amount of times you previously entered for him to spin. Then I just made the astronaut move down "height" meters again so he went back to the ground.

I personally like the first way I did it, it looks more realistic, but this way is even easier and it is the correct way to do it from the assignment.


All times are GMT -5. The time now is 03:19 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.