Vehicle Driver Map
by Tim Heldna · in Torque Game Engine · 04/26/2005 (5:46 am) · 3 replies
Hello everyone,
There is a vehicle resource posted here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3925
I'm sure anyone with vehicles in their game is familiar with this resource. One thing that is does is move all your keybindings for vehicles into a seperate vehicle map called VehicleDriverMap.cs. What this does is put all the keybindings for vehicles into this script file as opposed to default.bind.cs. Ok, that works fine for me but here's my problem...
I have more that 1 vehicle in my game at the moment and the key mapping is quite different between the two. I have a helicopter and a jeep. I want to have a seperate VehicleDriverMap for the two, so when you mount the helicopter it has its own keybindings and vice versa.
I've tried everything i can think of but no matter what vehicle i mount it always pushes the helicopter VehicleDriverMap.
In short what i've done, which isn't working, is the following...
I have one script called vehicle.cs which has all data relating to the jeep and a seperate *.cs file called air.cs with all data pertaining to the helicopter. I have a HelicopterDriverMap.cs file with all keybindings for the helicopter and one called JeepDriverMap.cs with a different set of key bindings. Everything is named accordingly in these files, i.e.
And in case your wondering i replaced all values in the air.cs script from %vehicle to %air.
So why won't this work, please help me as i'm running out of hair to pull out :)
Thanks
There is a vehicle resource posted here www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3925
I'm sure anyone with vehicles in their game is familiar with this resource. One thing that is does is move all your keybindings for vehicles into a seperate vehicle map called VehicleDriverMap.cs. What this does is put all the keybindings for vehicles into this script file as opposed to default.bind.cs. Ok, that works fine for me but here's my problem...
I have more that 1 vehicle in my game at the moment and the key mapping is quite different between the two. I have a helicopter and a jeep. I want to have a seperate VehicleDriverMap for the two, so when you mount the helicopter it has its own keybindings and vice versa.
I've tried everything i can think of but no matter what vehicle i mount it always pushes the helicopter VehicleDriverMap.
In short what i've done, which isn't working, is the following...
I have one script called vehicle.cs which has all data relating to the jeep and a seperate *.cs file called air.cs with all data pertaining to the helicopter. I have a HelicopterDriverMap.cs file with all keybindings for the helicopter and one called JeepDriverMap.cs with a different set of key bindings. Everything is named accordingly in these files, i.e.
$Vehicle::moveMaps[0] = "jeepDriverMap"; $Vehicle::moveMaps[1] = "jeepPassengerMap"; $Vehicle::moveMaps[2] = "jeepPassengerMap"; $Vehicle::moveMaps[3] = "jeepPassengerMap"; $Vehicle::moveMaps[4] = "jeepPassengerMap"; $Vehicle::moveMaps[5] = "jeepPassengerMap"; $Vehicle::moveMaps[6] = "jeepPassengerMap"; $Vehicle::moveMaps[7] = "jeepPassengerMap"; $Vehicle::moveMaps[8] = "jeepPassengerMap";and
$Air::moveMaps[0] = "heliDriverMap"; $Air::moveMaps[1] = "heliPassengerMap"; $Air::moveMaps[2] = "heliPassengerMap"; $Air::moveMaps[3] = "heliPassengerMap"; $Air::moveMaps[4] = "heliPassengerMap"; $Air::moveMaps[5] = "heliPassengerMap"; $Air::moveMaps[6] = "heliPassengerMap"; $Air::moveMaps[7] = "heliPassengerMap"; $Air::moveMaps[8] = "heliPassengerMap";
And in case your wondering i replaced all values in the air.cs script from %vehicle to %air.
So why won't this work, please help me as i'm running out of hair to pull out :)
Thanks
About the author
Associate Kyle Carter