Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Assign 4
Old
MBohnenstengel
Junior Member
 
Status: Offline
Posts: 13
Join Date: Jul 2018
Default 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.
   
Reply With Quote
Random jumps
Old
sella18
Junior Member
 
Status: Offline
Posts: 9
Join Date: Jul 2018
Default 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.
   
Reply With Quote
Old
Forumuser
Junior Member
 
Status: Offline
Posts: 12
Join Date: Jul 2018
Default 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.
   
Reply With Quote
Reply


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 Jump



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