Home   Help Search Login Register  

Author Topic: place gun script  (Read 483 times)

0 Members and 1 Guest are viewing this topic.

ThEoNeAnDoNlY

  • Guest
place gun script
« on: 03 Jan 2005, 00:28:56 »

hey, i have a place gun script going on here, but the gun keeps landing at my feet, i want to get it to land about 2-3 feet infront of me, can someone please tell me what i have to add to the stpos and getpos values etc.
Quote
titlecut ["","black in",4]
player switchmove "effectstandtalk"
_camera = "camera" camcreate [0,0,0]

_camera cameraeffect ["internal","front"]
_camera camsettarget player

_camera camsetrelpos [0.4,0.6,1.7]
_camera camcommit 0
titletext ["Ok i think we should put the gun here","plain down"]

~3

bang setpos getpos player

~3


_camera cameraeffect ["terminate","back"]

camdestroy _camera

player removeaction gun

exit   

cheers

guy

ThEoNeAnDoNlY

  • Guest
Re:place gun script
« Reply #1 on: 03 Jan 2005, 01:29:33 »
also could someone please tell me how to set the direction of the unit plz?

Guy

AK-Chester

  • Guest
Re:place gun script
« Reply #2 on: 03 Jan 2005, 02:04:36 »
Code: [Select]
~3
_dir = getDir player
_pos = getPos player

; optional direction change of 'bang'
bang setDir _dir

; place infront of the player
bang setPos [(_pos select 0)+(sin _dir), (_pos select 1)+(cos _dir), 0]
~3
Setting a unit's direction (0-360°):
Code: [Select]
unitName setDir 90

ThEoNeAnDoNlY

  • Guest
Re:place gun script
« Reply #3 on: 03 Jan 2005, 18:12:55 »
thank you very much oh kind one

Guy