Home   Help Search Login Register  

Author Topic: What determines whether or not a vehicle can move in water?  (Read 469 times)

0 Members and 1 Guest are viewing this topic.

firstflash

  • Guest
Does anyone know what determines that a vehicle can move in water?

I dont know much about cpp/config files but i assume for each individual vehicle, it is there.

Is it simply a switch? yes/no, 0 or 1 , kind of thing or is it more complex?

Im not trying to make anything that shouldnt float, float, not even the soldiers (although, in reality, soldiers should float somewhat, it seems a little wimpy that they just hit the water and instanly die).

But what im getting at is really in cases of airlifting cargo beneath a chopper.

If you airlift a vehicle beneath a ch47 using a setpos method, it works fine over land. However, when it comes to crossing water( one island to another within the same map), its a no-go. It stops at the coastline and hovers and the pilot just stares and says "oooh, pretty coastline!".

Also, when airlifting a vehicle (no matter how high) you still see the vehicle making tread/tire tracks on the ground as it moves along.

So i thought maybe the problem has to do with rules regarding whether or nor that particular vehicle can cross water.

Or maybe the tire track effects themselve cause the problem, in which case, can those be turned off?

Also i have tried with an M113 which can cross water (floating) but still wont be airlifted over water.

Any ideas?


Offline Ottie

  • Members
  • *
  • And you think this is personal
Re:What determines whether or not a vehicle can move in water?
« Reply #1 on: 29 Jan 2003, 08:26:26 »
In the cpp / config file of the vehicle you can add a field "canfloat" if I am right and this determines if a vehicle can move in water
If you can't beat them, buy them

walker

  • Guest
Re:What determines whether or not a vehicle can move in water?
« Reply #2 on: 29 Jan 2003, 16:21:24 »
The simulation also has an effect on how a vehicle treats water.

If you make a car simulation canfloat it still avoids water (is afraid of it)

Those APCs in the tank simulation and ships are the only vehcle types that are happy in water a car will always try to drive round or get very confused and just refuse to work.

I have experimented with this to make the new wetsuit/diver addons.

Kind Regards walker

walker

  • Guest
Re:What determines whether or not a vehicle can move in water?
« Reply #3 on: 29 Jan 2003, 16:29:47 »
Have you tried making sure the vehicle being transported is empty?

A get around for airlifting vehicles would be to make a dummy addon using the vehicle model for under the copter then altering the object to the true vehicle when it is dropped off.

Such an addon or group of addons would be a very simple set as they just need to be a few lines of config.cpp and use existing models.

There are probably other getarounds such as the setvelocity command rather than setpos.

Kind Regards walker

firstflash

  • Guest
Re:What determines whether or not a vehicle can move in water?
« Reply #4 on: 31 Jan 2003, 17:15:16 »
thanks walker,

the vehicles were moved both with crew and empty (to see if there was a difference, there wasn't)

i'll give setvelocity  a shot.