Who said driveable vehicles aren't possible???

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Who said driveable vehicles aren't possible???

Post by mohaa_rox »

Well, who said driveable vehicles aren't possible??? That's it. Now my latest project is to get some vehicles (with anims) driveable. For example, bf1942, someone drives a jeep, the other hops on. It will be someone driving a jeep and another operating the 30cal. Fun? I will design it to work in MP, and wait out for my test maps and screens.

p.s. I tried getting planes to fly, but no luck. :(
Live to map, not map to live.
-mohaa_rox, .map
moderator
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

psst. Can i help? :wink:
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
Cracker_Jack
Corporal
Posts: 45
Joined: Tue Jan 14, 2003 3:17 am
Location: Brisbane, Australia

Post by Cracker_Jack »

rox , your such a |337 mapper ... hehe :P

It would be good if you can get those jeeps to work.
That would make MP so much more tactical for like TDM and OBJ games.

What else you gonna make driveable.

Im suggesting those german bikes with sidecars. hee hee :)
|.: w00t w00t :.|
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

Create a brush, any size, and hit ?n? to bring up your ?Entity? window. Select from the list ?addon_vehicle_Russian_T34?. Double click on it and your brush will turn into that entity. To rotate the starting direction of your vehicle, select the vehicle and open your ?Entity? window. At the bottom of your ?Entity? window you will see buttons with 90, 45, 360, etc? Press the corresponding direction that you would like your vehicle to be facing (90 = north, 180 = west, etc?).

Now we have to give the vehicle a targetname. In the entity window, with the vehicle selected, enter the following values into the Key and Value fields at the bottom of the entity window.

Key: targetname
Value: playertank

To give your tank collision you have to target a bounding box. Instead of creating your own bounding box, copy the one from ?test_VehicleDrive.map? in the SDK. To do so, open the map file and select one of the pieces from the bounding box and then press (crtl + e) to select all pieces of the bounding box. With the bounding box selected open your map. When is asks copy selection, click yes. This will bring the bounding box of the tank into your map. Deselect the tank mask and select the T34 tank image. Open the ?Entity? window and enter the following into the Key and Value fields.

Key: target
Value: player_t34

This will connect your tank to the tank mask and give it collision. The Collision mask/bounding box can be placed anywhere on your map. Try to place it somewhere the player will never be but still inside of your skybox. Placing it under the terrain is as good as any.


Diagram 1-2 (Front View)

Finally we have to add the player start point to the map. To do so, right click on the grid and select ?info? -> ?player? -> ?start?. Place it anywhere in the map because in the script we are going to connect it to the tank. You just have to have the start point it doesn?t matter where. It is best to keep it next to your tank to make it clear that the player will start in that tank. We are finished with the map file all that is left is the script file.

THE SCRIPT FILE
Create a file with the same name as your map file and the extension .scr. For now copy and paste the script below or from ?test_VehicleDrive.scr?. If you take it from ?test_VehicleDrive.scr? make sure you change the targetnames and file name to match the ones in your map.


level waittill prespawn
level waittill spawn

main:
$playertank.collisionent = $playertank.target
level.playertanktarget = $player

$player holster
$player takeall
$player physics_off

$playertank waitthread global/vehicles_thinkers.scr::players_tank
$playertank vehiclespeed 200
end



Your vehicle should drive around with this script but here is what is going on in each line of the .scr.


$playertank.collisionent = $playertank.target
level.playertanktarget = $player



The first line gives the tank collision. The second line tells enemy tanks what to target at.


$player holster
$player takeall
$player physics_off



These three lines holster the players weapon, take away the players weapons, and remove the physics of the player b/c we are now using the tank?s physics.


$playertank waitthread global/vehicles_thinkers.scr::players_tank
$playertank vehiclespeed 200



The first line is the most important; it attaches the player to the tank. The second line sets the speed of the tank.

Save your file as a .scr and you are ready to drive your tank.



Who ever said that tell them to shut their pie hole.
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

The SDK tuts sucks. BTW, I'm getting the jeep to work now. One person will be the driver, and the other will operate the 30cal. Wait for updates. And I also need ppl to help me test 'em with me as it's meant for MP.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Gen Cobra
Major General
Posts: 739
Joined: Tue Jan 28, 2003 4:26 pm

Post by Gen Cobra »

You could probably wing it so you could jump in one and take a tour but that's as far as I could muster. :cry:
Image
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

I'm almost done with the jeep. Now need someone to test it with me, see if it works. 'Cause one person driving won't be able to see himself driving, so I need someone else to help me see that.

p.s I haven't done the sounds, so there's no sound. Bear with it.
Live to map, not map to live.
-mohaa_rox, .map
moderator
Cracker_Jack
Corporal
Posts: 45
Joined: Tue Jan 14, 2003 3:17 am
Location: Brisbane, Australia

Post by Cracker_Jack »

I'll help you if you want.

I got nothin else to do.

Im so bored of skool. zzzzzzzzz :?
|.: w00t w00t :.|
Desert Eagle
Captain
Posts: 237
Joined: Mon Jan 13, 2003 1:05 am
Location: Mapping Bunker
Contact:

Post by Desert Eagle »

I would be glad to help you out..and if you get it working even use it.
Desert-Eagle
....The Eagle Has Landed...
Cracker_Jack
Corporal
Posts: 45
Joined: Tue Jan 14, 2003 3:17 am
Location: Brisbane, Australia

Post by Cracker_Jack »

That would be great to use in MP games.

More war-like hehe especially when u can do drive bys with the mg on back
|.: w00t w00t :.|
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Anyone wanna help? You'll get credit.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

could you do this for singelplayer after please?
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

If it works in MP, why not SP?
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

so, you could drive, while grillo shoots?
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

it's possible in both SP and MP, some1's already done it, i'd send u the script but it took me blooooooody aggggeeeessss, but if u have any probs with out givin 2 much away i'll help ya,

i've been workin on that map as well as some others 4 quite a while now, so i can't just give up the treasure, u'll prob have ur's working b4 i get my map finished so goodluck 2 ya ROX :D
hope this helps, prob not cos it's all foreign 2 me :-/
Locked