I decided to get back into messing around with OFP scripting again after about a year off today, so I've been fooling around and making useless scripts in an attempt to get back up to speed. I'm having a problem that's stumping me, though...
Here's the script:
_Ammo = _this select 0
_Target = _this select 1
_oldX = GetPos _Ammo select 0
_oldY = GetPos _Ammo select 1
_oldZ = GetPOs _Ammo select 2
#Update
_newX = GetPos _Target select 0
_newY = GetPos _Target select 1
_newZ = GetPos _Target select 2
_Ammo SetPos [_newX,_newY,newZ]
_Ammo SetDammage 1
~0.01
_Ammo SetPos [_oldX,_oldY,_oldZ]
_Ammo SetDammage 0
~1
goto "Update"
It's basically an ultra-simple barage script that I'm going to incorporate with several more... but it doesn't work.
_Ammo SetPos [_newX,_newY,newZ] returns "type any, expected number."
I don't see why it doesn't work. I checked up on a few other similar scripts and I don't see anything out of order. Any insight would be appriciated.
Oh, and on a side note...
Is there any way to add multiple magazines in an array? I've always had to add each mag individually and that's kind of a pain.
Thanks.