Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
dumb questions that i have no answers to
Old
Cataphract
Guest
 
Status:
Posts: n/a
Default dumb questions that i have no answers to - 08-22-2006, 07:52 PM

1. How do u delete methods?
2. Again, how do YOU create a easy but accurate speedometer?
3. reallistic leg movements, any ideas how?
4. You know the beach terrain? I like the underwater part of it, how ever, i wish to put a collision of of it but still alowing it to go into the water, any ideas how?
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 08-23-2006, 06:11 AM

1. Delete methods - First delete any and all calls you might have made to your method. Close its edit window by right clicking ont the method's edit panel and selecting "close". Now drag it's tile from the methods list to the trash bin.

2. There are no predefined methods or properties to make creating an "accurate speedometer". You have to resolve the issues through trial and error in Alice.

3. The same answer as 2 above. Also you might try the He/She Builder from your People objects. But this is for peope, not animales, etc. The textbook gives a good example for a accomplishing this with a lunar robot in Chapter 2.

4. I do not know how to do this.

Good luck
   
Reply With Quote
Old
Cataphract
Guest
 
Status:
Posts: n/a
Default 08-23-2006, 04:28 PM

Quote:
Originally Posted by lanceA
1. Delete methods - First delete any and all calls you might have made to your method. Close its edit window by right clicking ont the method's edit panel and selecting "close". Now drag it's tile from the methods list to the trash bin.

2. There are no predefined methods or properties to make creating an "accurate speedometer". You have to resolve the issues through trial and error in Alice.

3. The same answer as 2 above. Also you might try the He/She Builder from your People objects. But this is for peope, not animales, etc. The textbook gives a good example for a accomplishing this with a lunar robot in Chapter 2.

4. I do not know how to do this.

Good luck
Thx for replying, i know how to do all number 2 and 4 but all my methods are quite complecated and time consuming, so i just wandered if there were any brighter ideas.
Anyway, thx for the first answer.
Heres how i do speedometer: make cone pointing left and a object at the point of it and set vehicle to the cone. Make the main object move foward as speed of a variable, lets say speed and then when you want to move the object, just increase the variable "speed". Now copy the cone, but this time, don;t set vehicle to anything but right next to or in side the first cone.
Here comes the functions, make cone1 turn "speed" divided by a confortable number, mine is 7 to 9 forwards, now make cone2 point at the object at the point of cone1 duration 0 seconds turn backwards "speed" divided by the same number as forwards.
And there you go, but if it turns the opposite way, just flip backwards into forwards.
As you can c, its quite troublesome to do this, plz think about a easier way, i find speedometer makes a game much more interesting
   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 08-24-2006, 05:51 AM

I really don't have any "...brighter ideas", but when working with ALICE I always wear two hats: I'm the script writer (spelled Programmer) and I'm the Hollywood Director who is on a tight $ budget, i.e. I have to work with the tools provided with Alice - I've been known to use a Conch shell object as a volcano before the new Hawaiian models came out. Therefore I need to be creative and place a lot of thought into how I will solve my problem. And I have to do all of this BEFORE I start dragging and dropping code. I only wish to write my program 1 time.

Normally you should only have to write a single collision detection method for your entire program, although on occassion there might be a need for a second routine in a program. Write the World Level function so that it accepts Objects as parameters and returns a boolean. I usually keep copying my collision detection routine from one program to another - I dislike reinventing the wheel each time.

As for incorporating a "speedometer" into a program I would put on my cheap Director's Hat, look at the tools provided in Alice and probably select the ComboLock object. I would then:
1. Set comboLock.latch.opacity = 0 (the object now somewhat resembles a "speedometer")

2. Write a parameterized Class Level method/function accepting a number which would indicate how much I should increase/decrease the position of the comboLock's dial object which will give the user visual feedback as to the tanks speed.
A. Based upon the value of the parameter received in this method and whether it was a positive or negative (+/-) value, the method would execute a comboLock.dial.roll = value of the parameter (because of the position of this object's center you must use roll and not the turn method).

3. Position the comboLock object in the screen's lower righthand corner and set it's vehicle = tank. It will now follow along with the tank.

4. If you want to write a cool program consider using a Timer object to help compute the tank's speed:

Alice doesn't have a Timer object so you will need to write one - Chapter 10, Example 1: A Timer of the manual shows how to write a simple Timer. Then write a World Level method which communicates the tank's movement, position, Time, etc. relative to the postion of the ground object and the time from your user-defined timer function to automatically compute and return a value to be passed to your comboLock.dial.roll method.

In keeping with good coding practices make this world level method generic by having it accept Objects as parameters, etc and then you will only have to write it once and you will be able to use it in other games that you will write.

That's my easy way to do it. I'm sure others will have good ideas also. Good luck

[EDIT] - Corrected typos/misspellings

Last edited by lanceA; 08-24-2006 at 07:43 AM.
   
Reply With Quote
Old
Cataphract
Guest
 
Status:
Posts: n/a
Default 08-24-2006, 08:10 AM

wow, neat... i got lost in there but sounds more accurate than mine, and with a timer, you can have the speed in numbers! like 87km/h
Thx for the reply, My text book kind of got stapled wrong, so pages are mixed up, i can;t find anything in there =P i will try to make a timer my self then
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.