Jump to content
Sign in to follow this  
erfworm

Need urgent help with script!

Recommended Posts

I have this script that attaches an M2 to a truck but it only does y and z values. What I need someone to do is make so I can add a x value here is the script

;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

_Object2 SetPos [ (_Pos Select 0) + _Distance * (Sin _Dir), (_Pos Select 1) + _Distance * (Cos _Dir),_ac+_amount]

~0.01

? not Alive _Object1 or not Alive _Object2 : Exit

Goto "Loop"

Thanks, erfworm

Share this post


Link to post
Share on other sites

you mean so that the gun will face an up/down angle on all axis respectively to the vehicle?

answer: you can't. you can only rotate an object around the Z coordinate in this game with current scripting commands.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×