cars go boom

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

Moderator: Moderators

Post Reply
wcs rufus
Lance Corporal
Posts: 15
Joined: Sat Jul 26, 2003 1:46 am
Contact:

cars go boom

Post by wcs rufus »

my cars in my map blow up and but then it is gone is the any way to make a dead car appear or make them not blow up at all when you shoot them
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Here is a reply to a similar thread on Nem's forum, written by Vonderbakluft.

The reason your cars explode is because of the type of model. If yo want to keep the cars the same, set their health to an outrageous number like 10,000.

Here it is:

There are 2 types of vehicles:
When rightclicking in MOHrad in 2D you can choose between:

1) static -> vehicles
These are static models like furniture and so on.
If they don't clip well you can cover them with clips. However i shouldn't use clip_all but the material clips according the supposed material of the surfaces of the vehicle, so you get the apropriate footstep sounds when on top of it and the right dirt fall-off when shooting it.

2) vehicles
These are much more intelligent vehicles that can have parameters like health, mass, acceleration and passenger slots. The reason that they go on top of your clip is that they think "I have gravity and am now in something that's clipping so i shouldn't be there but on the surface of it" If you put these vehicles in sky, they will nicely fall down when entering the map.

If you wanna use these ones you don't need standard clips but collisionentities. Collisionentities are not more than a group of clipbrushes that represent the borders of the vehicles so players and grenades cannot go thru.
Many of those vehicles are already clipped well. If not here's how to adjust your own collisionentities.

How to make collisionentities:

1) Vehicle itself.
Just choose a vehicle from the vehicle group of the menu that pops-up when rightclicking in 2D screen of mohrad. Next enter entity window and give it a targetname. F.e.

$targetname/mylada

2) Collision enity.
Make a construction of clipbrushes that represent the borders. In fact you have to rebuild the vehicle with material clips.
Next make the complex of clipbrushes a script_object and give it a targetname. F.e.

$targetname/myladacollent

Since the clipbrushes work i suggest to put this script_object outside the map. (The compiler accepts that)

3) Scripting (in your <mapname.scr>):

.....
level waittill prespawn
$mylada.collisionent = $myladacollent
<other stuff>
level waittill spawn

......


That's it.

I should suggest only using the 2nd category of vehicles when you want to do scripting operations with them.
If you use them static, you don't only have the probs you describes but also a health prob. Since these vehicles have health they will simply dissapear when their health goes below zero.

For weapons. Exactly the same story

Success
Image
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

all you have to do is type $car nodamage, and if you want it to explode, you gotta do scripting, and collitionents and stuff.
Post Reply