Alice Community Assign 4

 Assign 4
 MBohnenstengel Junior Member   Status: Offline Posts: 13 Join Date: Jul 2018 Assign 4 - 07-18-2018, 07:07 PM I liked assignment 4 the best although, its probably because I had more control over what I wanted to do. Mine was about a magical cat that went to high school. Basically its just dialogue between 2 students then the cat jumps and sings. Everything was pretty simple except for the jumping different heights. To make the cat jump at different heights, I loop 2 separate jumps. Since the "up" and "down" had to be the same distance in each jump, I had to make an attribute called distance. Then I would declare distance a random number. I had to make sure a re-declared distance in the second jump, so jump 1 and jump 2 would not be the same. Then I looped both jumps so they would repeat. Hopefully I did it correctly.
 Random jumps
 sella18 Junior Member   Status: Offline Posts: 9 Join Date: Jul 2018 Random jumps - 07-19-2018, 12:21 AM I had some real trouble with the random jumps too. I was getting them to jump up at different heights but they went down at random heights as well so parts disappeared into the ground or they stayed in the air. I am positive if I tried to explain how it works I would put it wrong so I'd like to give you a simple example to try on Alice, then you can play with it and see for yourself. First create a new world. I picked grass and I placed a white rabbit in it. Have the rabbit face the camera. Now create a method called jump. For this method create a number parameter called height. Now use the statement bunny moves up and use the height parameter as the height. Next use the statement bunny moves down, again using the height parameter. The method is finished now go to my first method and click on the bunny object. The jump method should be there. Select the jump method and place it in my first method. A drop down menu for height will appear, select none. Now go to world functions and drag random number into the height section. You should have a statement that says bunny.jump height=random number. This should make the bunny do random height jumps I suggest you put this on a loop so you can see the difference.
 Forumuser Junior Member   Status: Offline Posts: 12 Join Date: Jul 2018 07-19-2018, 12:32 AM That was pretty much what I did. I just didn't have it loop and instead just stuck my jump method in between verses of the silly boom boom song. I was thinking of having music play in the background of mine since I had some royalty free stuff on my computer. Looking back I think I would've used a world event to trigger the soundtrack. Like maybe one that triggers when a variable changes and just code in a method into the world.myfirstmethod that changes the variable at the place I want it to start playing. That's the only one I even barely understand right now maybe I could use another one.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge