Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Flight simulator: angles for plane (http://www.alice.org/community/showthread.php?t=1139)

rich0e0rick 01-13-2008 10:02 AM

Flight simulator: angles for plane
 
hello everyone.

I have made a flight simulator game and its pretty cool so far, but i would like to have a 3dtext that says the plane's angle compared to the ground. It would be cool for it to be a picture on the side of the screen with an arrow(pointing upward if the plane is, or to the right if the plane is going forward, or left if the plane is upside down, or downward if the plane is diving) I want it to include all the angles (either id 3dtext, or as arrow)

I already got a 3dtext that says the altitude, but this would also be very cool

p.s. For my altitude, i made it so that it puts the distance in between plane and ground( as string )times 25, in a 3dtext

hope you can help

please respond

:D Rick :D

mstram 01-18-2008 08:43 PM

Hi Rick,

I can't answer your question ... yet... as I just downloaded the program today and have spent only a few hours with it so far ;)

I'm also interested in flight simulators.

How did you get the 3dtext to display the altitude?

Also the sample flight simulator scene has the camera following the plane, sort of a "chase" camera.

Is it possible to "parent" a camera to the plane? ... i.e. a "view from the cockpit" camera.

or for that matter to parent any other objects to each other ?

**edit* found out about the "vehicle" property.

Any chance you could post your flight simulator file ?

Mike

rich0e0rick 01-19-2008 06:25 PM

Ok, first for the altitude
-make a loop inf.
-make a 3dtext and click on its properties.... then you should see TEXT option, drag that into your loop
you should see something like

loop inf
(TEXT) set text to (_____) more

Then go in your list to the top left, and click world
go to functions and get the WHAT AS A STRING method and drag it into the (______) part. ( it will ask you for a object, just click anything, we will change it later)

You should get something like

loop inf
(TEXT) set text to ( (object) as a string)

Next, got to world functions again, and get FLOOR ___ method and drag it into your (object) ( it will ask you for a number, put anything)

loop inf
(TEXT) set text to ( floor (number) as a string)

lastly, go to your plane functions and get _____ DISTANCE ABOVE and drag it into your number (click anything once again)

you should get

loop inf
(TEXT) set text to ( floor (_____ distance above____) as a string)

Just put it so its plane distance above ground and you are done

*****************************

Good that you found the vehicle

*****************************

no, i wont post my game, since it inst finished and it would simply take the fun out of figuring ALICE out

simply ask what you want to know, and sooner or later you will find out and find out and find out

Good luck

PS Ask on this forum for more help from me, Im good at flight simulators
PSS Friends?

:D Rick :D

rich0e0rick 01-19-2008 06:59 PM

here is what you should have so far (my game is ALOT BETTER)

ps the way i put the times 10 is by going to the more option after the distance above and clicking MATH (*) 10 option

(you cant turn in the game , i did it really fast so you would understand)

Talk to you in a couple of days i hope,

PS keep in touch

:D Rick :D

mstram 01-20-2008 08:18 PM

Rick,

Thx for the tips and example file !

Not really related to this, but more a general interface question:

After dragging multiple methods / functions to the "edit area", how do you either "expand" them (for editing) , or delete / remove only one function/method ?

Mike

rich0e0rick 02-03-2008 10:19 PM

Re
 
I don't exactly follow you but...
to delete an "inside" option, simply right click on the option and delete it....

as for expanding, i have no idea what you mean. it might be possible, but i don't know...

*********
EDIT

do you mean to put more than one thing in an option?

to do that, just put a "do in order" or "do together" insid the option..

*********
sorry..


:D Rick :D

mstram 02-04-2008 11:12 AM

[QUOTE=rich0e0rick;4550]

as for expanding, i have no idea what you mean.

[/QUOTE]

By expanding, I mean, after you have dragged two or three functions "on top" of each other ("text", "what as a...","floor"), you can only see the last thing that was dragged onto the interface, so if you want to edit or even be able to read the code, an "expand" mode would let you see something like :

floor(
text {
what_as_as(
distance_above)

etc..

Mike

Lucien 02-04-2008 04:32 PM

If you're dragging things one on top of the other and you can only see the last thing that was dragged, that probably means you're overwriting whatever you put before. It seems like you put floor, then overwrote it with x as text...

DickBaldwin 02-04-2008 09:22 PM

[quote=Lucien;4553]If you're dragging things one on top of the other and you can only see the last thing that was dragged, that probably means you're overwriting whatever you put before. It seems like you put floor, then overwrote it with x as text...[/quote]

No offense intended, but I don't understand any of this. On my Alice 2.0 system running under WinXP, it isn't possible to drop one method on top of another method. (At least I don't think it is possible.) You can only drop one method above or below another method.

However, it is sometimes possible to drop a function on top of a placeholder that exists within an existing statement if that function returns a value that is compatible with that part of the statement.

Also, the only way that I can think of to cause code to be collapsed and expanded in the edit window is to drop several methods inside a doTogether block, a doInOrder block, a for loop block, a while loop, an if-else block, and possibly a few other constructs that involve blocks of code. In those cases, all that is necessary to collapse the block is to click the minus (-) sign and all that is required to expand the block is to click the plus (+) sign.

This problem must be an aspect of drag-and-drop programming in Alice that I have never encountered. I'm looking forward to reading a description of the problem that I can understand and a description of the solution to the problem.

By the way, to delete a statement, you can either drag it to the trash can at the top, or right-click on the handle (the little dotted thing on the left) and select Delete from the popup menu. In fact, any time that you are dragging statements, deleting statements, or doing anything to an entire statement, it is best to use the handle to do whatever it is that you are going to do instead of trying to use the mouse and grab it somewhere to the right of the handle in the actual code.

Dick Baldwin
Free Alice tutorials: [URL]http://www.dickbaldwin.com/tocalice.htm[/URL]
Free programming tutorials: [URL]http://www.dickbaldwin.com/toc.htm[/URL]

rich0e0rick 03-06-2008 07:32 PM

Thanks Dickbaldwin, you explained a lot more than i could have.....


All times are GMT -5. The time now is 06:15 AM.

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