OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 22 Jun 2007, 00:26:47

Title: strange para behaviour
Post by: LCD on 22 Jun 2007, 00:26:47
im tryin 2 paradrop an ammo create 2 my mision area... simple isnt it  ??? a simple setpos command after creatin a parachute but... it seems da parachutes in ArmA act in very strange way... or mebe its da ammo crates  :dunno:

nywayz i get some very strange resualts (from ammo crate stuck in da air... or disapear in da ground or nything else...)

now heres my script (stilll not used 2 functions even tho i promise ill use em 4 next mision :D ;)

Code: [Select]
_para = "Parachute" createVehicle [0,0,0]
_para setpos [getpos player select 0, getpos player select 1, 50]
#loop
snip_cr setdir getdir _para
snip_cr setVelocity (velocity _para)
snip_cr setpos [getpos _para select 0,getpos _para select 1,(getpos  _para select 2)- 3]
~0.01
? ((getPos _para) select 2 < 1 or not alive _para) : Exit
goto "loop"

LCD OUT
Title: Re: strange para behaviour
Post by: The-Architect on 22 Jun 2007, 01:11:42
I had some real problems paradropping ammo crates. My trouble was because the object is static, meaning that if you place it 100ft up in the air, it'll stay there.

To get around it, I cam created a silenced pistol bullet above the crate and it dropped.

That was in Flashpoint so I don't know if it will work for you.

Alternativly you can search for a crate drop script. I'm sure I've seen one somewhere.
Title: Re: strange para behaviour
Post by: bedges on 22 Jun 2007, 01:15:45
use a game logic. from tyger's script:

Code: [Select]
_parachute = "Parachute" camCreate [(_pos select 0) + 2,(_pos select 1) + 10, 175]
_parachute setdir random 360
_logic = "Logic" camCreate [0,0,0]
_logic moveInDriver _parachute

#ParaLoop
_parachute setVelocity [(velocity _parachute select 0) / 1.1, (velocity _parachute select 1) / 1.1, -6]
_ammobox setPos [getPos _logic select 0, getPos _logic select 1, (getPos _logic select 2) + 1]
_ammobox setdir getdir _logic
~0.01
? vehicle _logic != _logic : goto "ParaLoop"

_ammobox setPos [getPos _ammobox select 0, getPos _ammobox select 1, 0]
deleteVehicle _logic

works in ofp, untested in arma.
Title: Re: strange para behaviour
Post by: LCD on 22 Jun 2007, 02:02:30
thx bedges :D seems fine

just have 2 change da createVehicle da gamelogic or it wont get in da chute  :D

LCD OUT