Home   Help Search Login Register  

Author Topic: Add MG to any vehicle  (Read 1056 times)

0 Members and 1 Guest are viewing this topic.

Akbar

  • Guest
Add MG to any vehicle
« on: 01 Jun 2006, 03:18:36 »
I used to have this script... but lost it. It added a MG on top of any vehicle, and you could adjust the height at which the mg rests... if anyone has this please post. 8) thanks

Offline James Spence

  • Members
  • *
Re: Add MG to any vehicle
« Reply #1 on: 01 Jun 2006, 09:53:05 »
http://ofp.gamepark.cz/editor/hummermg.zip

This is a script to add an MG to a HMMVW from ofp.info, not sure if it tells you how to add it to anything else but it may just be changing the name of the vehicle the scripted is designated to.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Add MG to any vehicle
« Reply #2 on: 01 Jun 2006, 12:36:19 »
Checked the hummer script, it seemed rather simplistic to me, and mostly designed to transport stuff, no? Well, I can't vouch for if this script is exactly what you're looking for either, but give it a go : as the script says in the comments :

;the script mounts anything on top of another thing, it was "made" to be worked with or by
;mounting m2s on top of cars
;usage:[car,m2,distance behind or front of car,height] exec "mount.sqs"

Code: [Select]
;the script mounts anything on top of another thing, it was "made" to be worked with or by ;mounting m2s on top of cars
;usage:[car,m2,distance behind or front of car,height] exec "mount.sqs"

_Object1 = _this Select 0
_Object2 = _this Select 1
_Distance = _this Select 2
_amount =_this select 3

#Loop
_Pos = GetPos _Object1

_ac =_pos select 2
_Dir = GetDir _Object1

;thanks to sefe for the following lines

_Object2 SetPos [ (_Pos Select 0) + _Distance * (Sin _Dir), (_Pos Select 1) + _Distance * (Cos _Dir),_ac+_amount]
_object2 setdir (_dir)
gunner _object2 setdir (_dir)
~0.01
? not Alive _Object1 or not Alive _Object2 : Exit
Goto "Loop"

try it out for size  8)

/Wolfrug out.
"When 900 years YOU reach, look as good you will not!"