OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: jcl999 on 03 May 2005, 19:12:40

Title: Flat tires.
Post by: jcl999 on 03 May 2005, 19:12:40
Does anyone have a flat tire script? I want it so it makes all the tires on a vehicle flat. I've tried searching the forums and couldn't find one, i also looked at the turtorials and found one but that always blew up the truck.  >:(
Title: Re:Flat tires.
Post by: pazuzu on 03 May 2005, 19:45:24
Cant you just give the vehicle a little dammage?

Vehicle setdammage .3

Not sure if this would do but might be worth testing.
Title: Re:Flat tires.
Post by: jcl999 on 03 May 2005, 20:57:28
Cant you just give the vehicle a little dammage?

Vehicle setdammage .3

Not sure if this would do but might be worth testing.

If i enter it into the init, i get unknown operator.
Title: Re:Flat tires.
Post by: Planck on 03 May 2005, 21:03:23
Emmm.......that would be:

whatevernameyougaveyourvehicle setdammage 0.3

or just

this setdammage 0.3

Planck
Title: Re:Flat tires.
Post by: jcl999 on 03 May 2005, 21:12:47
Emmm.......that would be:

whatevernameyougaveyourvehicle setdammage 0.3

or just

this setdammage 0.3

Planck

Thanks, i've got that to work but the tires are still up.
Title: Re:Flat tires.
Post by: Planck on 03 May 2005, 21:23:12
Well, experiment............try 0.4 next.


EDIT   Well, it doesn't really work, I just tried it.  I have no idea how to get a flat tyre, apart form shooting the wheel then.



Planck
Title: Re:Flat tires.
Post by: macguba on 03 May 2005, 22:09:09
IIRC you can't make a flat tyre visually on a standard vehicle, there is no texture for it.    You'd have to make an addon.
Title: Re:Flat tires.
Post by: pazuzu on 03 May 2005, 22:24:55
There's a script for flat tire at editors depot.


http://www.ofpec.com/includes/download2.php?id=82
Title: Re:Flat tires.
Post by: Blanco on 03 May 2005, 23:47:33
Here's a crazy idea...

Camcreate bullets and give them some speed and direction with the setvelocity command. (not easy)
Repeat this until canmove is false.
Title: Re:Flat tires.
Post by: Merc on 05 May 2005, 23:45:40
@Blanco
All you would have to do is camcreate bullets right where the tires are (a lot easyer said then done) and you wouldn't have to mess around with setvelocity.
Title: Re:Flat tires.
Post by: Kyle Sarnik on 07 May 2005, 04:28:57
whoops = "GrenadeHand" camcreate (getpos this)
Title: Re:Flat tires.
Post by: XCess on 07 May 2005, 04:55:44
whoops = "GrenadeHand" camcreate [(getpos this select 0)+ X,(getPos this select 1)+ Y,(getPos this select 2)+ Z]

Change X Y and Z until the bullet is at the same position as the tyre.  ::)

GrenadeHand surely aint the right classname though  ???
Title: Re:Flat tires.
Post by: Kyle Sarnik on 07 May 2005, 04:58:40
Actualy, it is, trust me, Im the guy who made the grenade pack, GrenadeHand is the ammo classname, the mag name is HandGrenade...
Title: Re:Flat tires.
Post by: Blanco on 07 May 2005, 05:01:41
@Blanco
All you would have to do is camcreate bullets right where the tires are (a lot easyer said then done) and you wouldn't have to mess around with setvelocity.

Working on it... It just need some more testing.
The script already works
 

Title: Re:Flat tires.
Post by: XCess on 07 May 2005, 05:10:29
Actualy, it is, trust me, Im the guy who made the grenade pack, GrenadeHand is the ammo classname, the mag name is HandGrenade...

Learn summit new every day lol.  :D
Title: Re:Flat tires.
Post by: Blanco on 07 May 2005, 05:34:41
Here you go...a quick test

http://users.telenet.be/blanco/Scripts/flattire.eden.zip

Script is activated by :

1) name of the vehicle
2) relative position x coord
3) relative position y coord
Example for the US jeep :

[mycar,1,2] exec "flattire.sqs"

This creates MGbullets at the right front tire of a US Jeep.

*edit*
These values for the Jeep are more precise

0.7,1.8
for the right front tire
-0.7,1.8
for the left front tire.