Home   Help Search Login Register  

Author Topic: Deployement of smoke by ground vehicles ?  (Read 1406 times)

0 Members and 1 Guest are viewing this topic.

PicVert

  • Guest
Deployement of smoke by ground vehicles ?
« on: 08 Oct 2003, 11:04:53 »
Hello,
I have made a script with some help but we cannot make the right thing we would do... so I decided to post an image to help you to see what we wanna make :


So if you could help for making this script it would be great ;) thx for help.

Think about a trick it deploy the smoke by use a weapon I just need the drop script or camcrate but I have tested the camcrate (like a the noob as I m) and it could not deploy it in alf of circle in front of the vehicle just in real direction Nort South etc.. but not of the vehicle dir drop it in the dir of Island ... :(
« Last Edit: 08 Oct 2003, 11:10:25 by PicVert »

Rubble_Maker

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #1 on: 08 Oct 2003, 22:05:37 »
Basically you get the spawn positions of the ammo like this:


_dir=getdir TANK
_dist=2
_spawnx= (getpos TANK select 0) + _dist*sin (_dir+_ang)
_spawny= (getpos TANK select 1) + _dist*cos (_dir+_ang)

_ang is the offset angle you add to the vehicle's map heading, i.e. how many degrees to rotate. Can't remember which direction positive values rotate, but I guess its to the left. The OFP coordinate system is totally weird though; it measures angles relative to the Y-axis.

Anyways, try these values for _ang:

-30,-20,-10,0,10,20,30

_dist is the distance from the tank, i.e. how far to fling the shells from their launch pods.

Rubble_Maker

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #2 on: 08 Oct 2003, 22:18:10 »
btw it'd be nice if you'd not just spawn the rounds at their final position; that'd look pretty cheap. Rather shoot them from their launch position. Camcreate them somewhere, then put them to the vehicle's position and set their velocity vector to fire them. To get the velocity vector, you can use something like

_speed= 100
_vectx= _speed*sin (_dir+_ang)
_vecty= _speed*cos (_dir+_ang)
_vectz=10

PicVert

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #3 on: 09 Oct 2003, 09:40:05 »
Thx a lot I will test it ;)

I give you two "*" "*"  :)

Offline KTottE

  • Former Staff
  • ****
Re:Deployement of smoke by ground vehicles ?
« Reply #4 on: 09 Oct 2003, 12:30:36 »
Download the BAS Tonal and OFPOR pack, it has that built in :)
Then you can see how they did it and duplicate it for yourself.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

PicVert

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #5 on: 09 Oct 2003, 13:49:14 »
It's done but I have one problem it's lauched right in alf of circle but It did not follow the turret dir just the vehicle dir :( did BAS has the corect code to follow the turret dir ?

Can I did follow the aiming point by a code ? or maybe can I use the bullet dir ?

Cause it's lauched by using a fake MG weapon.

Sorry my question is a bit wrong in first post  :-X
« Last Edit: 10 Oct 2003, 03:47:05 by PicVert »

Rubble_Maker

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #6 on: 09 Oct 2003, 19:36:12 »
try using the commander's dir.

The rest of your question I did not understand ;)

Offline KTottE

  • Former Staff
  • ****
Re:Deployement of smoke by ground vehicles ?
« Reply #7 on: 09 Oct 2003, 20:09:13 »
The GetDir command will return the direction of the vehicle, not the direction of the turret. This is a flaw within OFP, and you cannot work around this.

But I have it on good authority that AngusHeaf has sorted his script so that it's usable from the action menu, which means we'll probably see it released fairly soon :)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

PicVert

  • Guest
Re:Deployement of smoke by ground vehicles ?
« Reply #8 on: 10 Oct 2003, 03:48:47 »
ok thx a lot .