OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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. >:(
-
Cant you just give the vehicle a little dammage?
Vehicle setdammage .3
Not sure if this would do but might be worth testing.
-
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.
-
Emmm.......that would be:
whatevernameyougaveyourvehicle setdammage 0.3
or just
this setdammage 0.3
Planck
-
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.
-
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
-
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.
-
There's a script for flat tire at editors depot.
http://www.ofpec.com/includes/download2.php?id=82
-
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.
-
@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.
-
whoops = "GrenadeHand" camcreate (getpos this)
-
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 ???
-
Actualy, it is, trust me, Im the guy who made the grenade pack, GrenadeHand is the ammo classname, the mag name is HandGrenade...
-
@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
-
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
-
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.