Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Grand Theft Auto: Wisconsin (http://www.alice.org/community/showthread.php?t=3175)

pancake 10-08-2009 04:44 PM

Grand Theft Auto: Wisconsin
 
1 Attachment(s)
Hey peeps I am starting to work on a GTA game. I made a city and put some people and cars in there. The station wagon is following the cubes on the road (for a simulated car path). I would like to know how to get my guy into that moving vehicle and make him control the car.

Thanks for your help and please comment! :D

NivekNamttid 11-18-2009 12:46 PM

Solution
 
If your person is controlled by the arrow keys, you could have him set point of veiw to car and set the cars vehicle to the character, and have the character turn invisible.
Since you said the car is following a route, it would have to stop following that route in order to enable player control. In your method for the car's movement along that route, have it use an if/else statement to check if the character is within a very small amount of meters of the car. Then, the character is still moving, but it is also controlling the car.
As for getting out of the car, have a method activated by clicking on the ground which sets all possible cars vehicles to world, and returns them to their preset routes. This should also make the character visible again.


All times are GMT -5. The time now is 01:23 PM.

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