How should I script a flying vehicle?
by Lee-Orr Orbach · in Torque Game Engine · 08/03/2005 (3:53 pm) · 13 replies
Hello there!
I wanted to know if any of you can tell me how to use script to create and control a flying vehicle?
I think there is a built-in flying vehicle class, but I don't understand what is written in the documentation.
I'll really appreciate the help,
lee-orr
I wanted to know if any of you can tell me how to use script to create and control a flying vehicle?
I think there is a built-in flying vehicle class, but I don't understand what is written in the documentation.
I'll really appreciate the help,
lee-orr
About the author
#2
08/03/2005 (4:37 pm)
The bravetree pack is a great place to start. A fully modeled and scripted plane to use out of the box.
#3
08/03/2005 (4:51 pm)
Have you tried searching for a resource on flying vehicles? There are some free examples, as well as some content packs you can buy which are pretty good examples in and of themselves.
#4
if anyone can help me, I'll be really greatful.
thanks,
lee-orr
08/04/2005 (2:56 am)
I have tried to search the resources for flying vehicles, but none of the resources works. I simply don't understand why it doesn't, so I asked here in the fourms. I can't buy any content packs right now, so that isn't an option for me now.if anyone can help me, I'll be really greatful.
thanks,
lee-orr
#5
The first case is very easy to solve. Get the racing example and change wheeled vehicle for flying vehicle in some code lines ( you might need to find a flying vehicle datablock somewhere, but that's not hard ).
The second case is harder. I wrote [url= http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7079]this resource[/url] to show how it's done.
HTH
Bruno
08/04/2005 (7:42 am)
What exactly you want to do with the flying vehicle ? Do you want the player to fly it or do you want a bot to fly it ?The first case is very easy to solve. Get the racing example and change wheeled vehicle for flying vehicle in some code lines ( you might need to find a flying vehicle datablock somewhere, but that's not hard ).
The second case is harder. I wrote [url= http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7079]this resource[/url] to show how it's done.
HTH
Bruno
#6
I'll try it again, but I don't know if it will work.
if there is any other way, except those already said here, please tell me.
thanks again,
lee-orr
08/04/2005 (10:06 am)
I want to have the player fly the vehicle, and I tried what Bruno said,which is mucdh like, if not exactly, whats shown in this recource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5071. in this recource, the car starts in the air, like the recource said it will, but then it falls all the way down and gets stuck upside-down.I'll try it again, but I don't know if it will work.
if there is any other way, except those already said here, please tell me.
thanks again,
lee-orr
#8
thanks,
lee-orr
08/04/2005 (10:19 am)
Thanks, but as I said, the recource doesn't work for some reason. I need some help, and if possible, can you explain it on the here forum? thanks,
lee-orr
#9
Copy the data and server folders in the download to "example/starter.racing"
Open "example/main.cs" and change this line (it's right at the top)
Then run the game. You should start controlling the vehicle in the air. When the timer counts down, you can move with the standard mouse + wasd. Tab will take you to a 3rd person view.
08/04/2005 (10:29 am)
Well, what I did when I installed it (using the stock 1.3 version of the engine) just now was this:Copy the data and server folders in the download to "example/starter.racing"
Open "example/main.cs" and change this line (it's right at the top)
$defaultGame = "starter.fps";to this
$defaultGame = "starter.racing";
Then run the game. You should start controlling the vehicle in the air. When the timer counts down, you can move with the standard mouse + wasd. Tab will take you to a 3rd person view.
#10
thanks,
lee-orr
08/04/2005 (10:37 am)
I'll try it, but whan I tried the recource last time, I simply clicked the desktop shortcut that opens the starter.racing game, so I don't think thats the problem.thanks,
lee-orr
#11
thanks,
lee-orr
08/04/2005 (10:40 am)
What you suggested gave me the same results as what normally happens, the car fell down to the floor, and stayed there.thanks,
lee-orr
#12
08/04/2005 (8:23 pm)
Does the car have wheels on it ? If it has that means you are using a wrong datablock. A bad Datablock would also cause the car to fall.
#13
I found the problem!!!
thanks Everyone for the help!!!
the problem was that the engine didn't re-make .cs.dso files after I changed the scripts.
Tanks again,
lee-orr
08/05/2005 (3:37 am)
Success!!!I found the problem!!!
thanks Everyone for the help!!!
the problem was that the engine didn't re-make .cs.dso files after I changed the scripts.
Tanks again,
lee-orr
Torque Owner Adam Larson
Searching before posting is good.