Home   Help Search Login Register  

Author Topic: Damage wheels of a car  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Damage wheels of a car
« on: 02 Aug 2007, 16:06:46 »
Hey

I want to have some effect of 1 or more wheels of a car being destroyed or 'popped' via a script. I've tried meathods of creating bullets and setvelocity'ing them but it can never be spot on. I've tried a grenade and that sometimes work but the car also receives a lot of damage, and you get a loud bang and smoke etc.

I just want the wheels to just become destroyed in a script. Anyone got any ideas?

Thanks,
JasonO

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: Damage wheels of a car
« Reply #1 on: 02 Aug 2007, 17:58:41 »
Try and create a bullet at the exact position of the tire. Or even multiple bullets for a sure effect. Skip the whole setVelocity part. I use the same idea to give an execution effect on soldiers by creating a bullet inside their head.

If you can't get it done with bullets, then I think you'll probably have to live with a grenade or some sort of explosive. SetDammage won't work because it will damage the entire car, and if I remeber correctly, then it won't even damage the tires.

"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Damage wheels of a car
« Reply #2 on: 02 Aug 2007, 20:03:02 »
How can I make it so it's aimed at the wheel of the car?

This is for a script that means any wheel of any car (or bike) can be burst. The bullets have a tendency to shoot down on top of the unit, and not underneath (even though I setpos is below the car the bullets appear to hit the hood). I can't just setpos the bullet at a wheel because I would need to do it for each and every vehicle that's used in the mission (its a very big mission for MP).

I'm thinking of having it spawn the bullet to the side and fire it sideways towards the car. All wheels are the same height, but not same lenth apart so it is difficult.

If I still can't do that I might fake it with setvelocity and multiply the speed in a loop thats less than 1.

Thanks for your help guys.
« Last Edit: 03 Aug 2007, 01:46:47 by JasonO »

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: Damage wheels of a car
« Reply #3 on: 03 Aug 2007, 01:05:39 »
Well not necessarily. There are how many vehicle types in the mission? I.E. truck, jeep, jeep with mounted mg, hummer with tow, etc.

You only need to create a position for each vehicle type. All of the hummers should be based off of the same general model so just one position for hummers etc. It will require a little work because you have to find the position once for each vehicle "class" as we shall call it. But once you have that position, it will work on every vehicle you place.

Quote
How can I make it so it's aimed at the wheel of the car?
If you create it inside the wheel, it instantly hits, and causes the effect. Just as if I created a bullet inside a soldier's head, he'll instantly die.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Blanco

  • Former Staff
  • ****
Re: Damage wheels of a car
« Reply #4 on: 03 Aug 2007, 01:27:16 »
How can I make it so it's aimed at the wheel of the car?

Use the ModeltoWorld command to create your bullet at the exact spot.
Use M2 ammo so you only need a few bullets to "flatten" the tire and use the canmove command to check the vehicle's status.

I've made an experimental script in OFP for that long time ago. I created 4 users action, one for each wheel so you were able to flatten the tire yourself. The script is not available anymore but to give you an idea : http://www.ofpec.com/forum/index.php?topic=24776.msg169173#msg169173

 


Search or search or search before you ask.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Damage wheels of a car
« Reply #5 on: 03 Aug 2007, 01:40:31 »
Thanks for the reply.

It will be awkward for each vehicle to be manually done as this is for a mini mod. Nearly all vehicles in ArmA is used, plus many others from addons. The mod will have additional vehicles added over time as well.

So this is the only way huh?

Blanco, your script needs the manual position of each wheel I assume for it to work?


Offline Blanco

  • Former Staff
  • ****
Re: Damage wheels of a car
« Reply #6 on: 03 Aug 2007, 01:57:32 »
Yup that's the downside, you have to create a sort of database with wheelpositions for each supported vehicle.
I'm afraid there's no other way to do this.

Btw, it would look odd in Arma with those rusty wheels, i really liked the flat tires in OFP.





« Last Edit: 03 Aug 2007, 02:01:46 by Blanco »
Search or search or search before you ask.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Damage wheels of a car
« Reply #7 on: 03 Aug 2007, 03:58:08 »
Yes the rusty tires do look a bit shabby.

I've decided to use a script that acts as an automatic break. Its basically the opposite of a boost script and setvelocity's the car the opposite way so its slowing it down until it stops. When it does I remove the fuel. When the tires pop i'm making a slight random direction change and make the car shake a bit while it comes to a stop. Since the car needs to have the feeling that it's wheels are about to come off.
It works for what I want for now, hopefully the car won't stop near a fuel station or barrel lol.
« Last Edit: 03 Aug 2007, 04:13:27 by JasonO »