Home   Help Search Login Register  

Author Topic: Simple Amo Crate Attached to Parachute??  (Read 3088 times)

0 Members and 2 Guests are viewing this topic.

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Simple Amo Crate Attached to Parachute??
« on: 12 Mar 2005, 16:34:55 »
I have problems attaching an Amo crate to one parachute.
I would like to use 2 chutes to the crate.(more realistic)
I Do Not want to start from a heilo, plane or anything else like the Tuts' give. Too much AntiAir in area.
I have gotten my guys attached to parachutes.
Soilder Name: Sdr1
Soilder Int: Sdr1 moveindriver para1.
Parachute set to flying
Parachute Name: para1
Set the parachute height Int: para1  flyinheitght 140.

But that Darn Amo Crate doesn't, ideas??
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #1 on: 12 Mar 2005, 16:49:18 »
The way I have done this is to use a fast looping script to setPos the ammocrate a certain distance below a falling parachute.  I can find the distance if you need it.  The script exits when the crate is on or near the ground.  I even did the same with M113s Trucks jeeps and Abrams.
« Last Edit: 12 Mar 2005, 16:50:13 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Amo Crate Attached to Parachute??
« Reply #2 on: 12 Mar 2005, 16:49:57 »
I doubt ammo crates can drive parachutes.    Create the parachute, and use a setpos loop to keep the ammo crate underneath it.

Edit:  beaten again.   :-[
« Last Edit: 12 Mar 2005, 16:50:18 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #3 on: 12 Mar 2005, 16:50:34 »
Beat you!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Amo Crate Attached to Parachute??
« Reply #4 on: 12 Mar 2005, 16:56:44 »
I let you win.  
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #5 on: 12 Mar 2005, 17:05:01 »
 :tomato:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Amo Crate Attached to Parachute??
« Reply #6 on: 12 Mar 2005, 17:46:19 »
Correct!

Anyway, back on topic.   sharkyjoe, I hope it works.  Let us know how you get on.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #7 on: 12 Mar 2005, 18:28:03 »
This is an extract from a script I have used.

Code: [Select]
#DropUpdate

_chutePos = getPos _chute
_chutePosX = _chutePos select 0
_chutePosY = _chutePos select 1
_chutePosZ = _chutePos select 2

_car setPos [_chutePosX, _chutePosY, _chutePosZ - 3]
~0.01
? (_chutePosZ > 3) : goto "DropUpdate"
exit

The script was originally written by: David Berka

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #8 on: 12 Mar 2005, 18:29:24 »
Well thanks for info.  :)  This drop looks taliored for me but ran into a snag. not good info before download stage(maybe some info fixing needs to be done on this prior to downlad). There really was not much of txt. for info.
Use Para Drop from Edit Dept. having hard time figuring out some stuff. --Marker? -- > What is it and Where do i put it. Height of what?

usage: [cargo, marker, height, DropHeight, xoffset, yoffset, zoffset] exec "ParaDropObject.sqs"
;see ParaDropObject.txt for full info
;
;*********************

;Gets Variables from script call.
_Cargo = _this select 0
_Marker = _this select 1
_Height = _this select 2
_DropHeight = _this select 3
;These variables allow you to apply an offset to the parachute.
;Using these variables you can position the parachute so it looks right above the object.
;Experimentation is the key here.
_XOffset = _this select 4
_YOffset = _this select 5
_ZOffset = _this select 6

;Seems to kickstart a vehicle, without it they just sit there, or worse hover.
_Cargo domove [(getPos _Cargo select 0), (getPos _Cargo select 1)]

;Sets Initial Variables
_MarkerPos = GetMarkerPos _Marker
_cx = _MarkerPos select 0
_cy = _MarkerPos select 1
_cz = _MarkerPos select 2
_Dir = 0

;Creates and Sets Initial position of Cargo.
_Cargo setpos[_cx, _cy, (_cz + _Height)]

;Places Cargo and parachute at required position,height and offset
_Parachute = "parachute" camCreate[((getPos _Cargo select 0) + _XOffset), ((getPos _Cargo select 1) + _YOffset), ((getPos _Cargo select 2) + _ZOffset)]

;Places Cargo relative to Parachute
;Note the offset is reversed because we are making the cargo relative to the parachute and
;Not the other way around as in the previous camcreate call
#Loop1
~0.01
_dir = getdir _Parachute
_Cargo setdir _dir
_Cargo setpos[((getPos _Parachute select 0) - _XOffset), ((getPos _Parachute select 1) - _YOffset), ((getPos _Parachute select 2) - _ZOffset)]
;Loops Until Object reaches the ground, warning: if you set the drop height to zero the cargo
;has a tendancy to disappear
?((getpos _Cargo select 2) > _DropHeight): goto "Loop1"

#Loop1 Exit



exit

« Last Edit: 12 Mar 2005, 19:17:21 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

bored_onion

  • Guest
Re:Simple Amo Crate Attached to Parachute??
« Reply #9 on: 12 Mar 2005, 19:13:50 »
theres one of these in the ed depot. looks a bit weird though.

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #10 on: 12 Mar 2005, 22:58:16 »
ya i took the script from Ed. Depot but what does Maker mean and how do I trigger the script to go? plus all the other questions I asked previously.
Gee's i feel really brain dead now  :P
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Amo Crate Attached to Parachute??
« Reply #11 on: 13 Mar 2005, 21:07:17 »
It's not maker, its marker.

You call the script with a command like this

[cargo, marker, height, DropHeight, xoffset, yoffset, zoffset] exec "ParaDropObject.sqs"

where:

- cargo is the name of the object, in this case your ammo crate

- marker is the name of a marker which is where you want the drop to occur

- height is self explanatory

- and the offsets are the amounts by which the position of the parachute is offset from the position of the object.    Start with 0, 0, 2 and then experiment


But before doing anything else read snYpir's A Friendly Intro to Code Snippets in the Editors Depot.
« Last Edit: 13 Mar 2005, 21:07:43 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #12 on: 15 Mar 2005, 05:34:39 »
Ok i'm an Idiot and i cann't spell.. No arguement there :-X
Read the Tut like suggested... Digesting that... Marching on..

I tried to call the Script from a trigger, like have in the past with the [ name, name,...] exec "name.sqs"  no go.
Put Crate in Called C1
put a marker in called Drop (solved the trigger "Drop1" calling execute)
put height in number 100----> dont know why sounded like a good #
put parachute in called para1 --->dont think I need to have one but named just in case
and then the x,y,z numbers

error message in trigg activation line won't let me past the height number.
who or what calls this script to excute this script. A trigger should do it , right??
Ok it's calling the script, Parachute is cramcreted, so no need to put in chute.
Parachute is deployed but no Ammo Crate under Chute, why??
New error in the calling of position of cargo(in this case crate)
Error Message :  _cargo getpos[_cx,_cy,(_cz+height)] /#/: error type expect number.
I did put a number in there and 20 other numbers from high to low.
« Last Edit: 15 Mar 2005, 06:29:50 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Simple Amo Crate Attached to Parachute??
« Reply #13 on: 15 Mar 2005, 08:22:09 »
It should either be

_cargo setPos ....  if you are placing the cargo

or

getPos _cargo  if you are trying to find where it is

 _cargo getpos...  is wrong.

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Simple Amo Crate Attached to Parachute??
« Reply #14 on: 15 Mar 2005, 23:14:48 »
Ok if what you(Thobson) are saying is true, then the script that i got from the Editors Depot made by Mark Palmer named Para Drop Script is wrong in the scripting of the sqs file. I have included this,sqs file, above, his entire script. So the problem lies in the lines where the script call's for postions of cargo then??
;Creates and Sets Initial position of Cargo.
_Cargo setpos[_cx, _cy, (_cz + _Height)]

I'm i right?? then change this around as suggested  ???

20 mins later afeter trying different ways, as suggested and thought up ones
Is there something wrong with Mark Palmers script??
Still getting error message same as before.
_Cargo setpos[_cx, _cy, (_cz + _Height)]/#/: invalid error type any expected number
« Last Edit: 15 Mar 2005, 23:45:13 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance