Home   Help Search Login Register  

Author Topic: Paradrop ammo?  (Read 1464 times)

0 Members and 1 Guest are viewing this topic.

RedKnyte

  • Guest
Paradrop ammo?
« on: 18 Sep 2002, 13:27:05 »
Is there anyway or script that is able to drop ammunition on the battlefield? ???I'm using a plane (C130 addon) for the drop anybody is welcome to answer.  :D And I mean, ammunition :gunman: not ammo trucks :noo: okay...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Paradrop ammo?
« Reply #1 on: 19 Sep 2002, 02:51:25 »
Hmmm .... the short answer is yes but I'm not exactly sure how.    This might be a start:  create an ammo crate in an obscure corner of the map and load it up with whatever you want.      At the appropriate moment attach it to a parachute and teleport it to just under the Hercules.    Use the getpos and setpos commands for the teleporting:  regret I don't know how to use parachutes - it may not be possible to use ammo crates with them.

Alternatively make the Hercules fly very low (flyinheight) over the DZ, make sure the player is slightly distant from the DZ so he can't see exactly what is going on, claim its one of these low altitude drops where they basically just chuck everything out of the back of the plane and then simply teleport the ammo crate into position.

Checkout the [un]official command ref in the Editor's Depot for details of how to use getpos, setpos and flyinheight, you may also need addmagazinecargo if you want to custom load the crate.

I know this is not a perfect answer but it might help give you some pointers.   I guess you've already searched the Ed depot for a script.
Plenty of reviewed ArmA missions for you to play

Mike

  • Guest
Re:Paradrop ammo?
« Reply #2 on: 19 Sep 2002, 03:03:51 »
Vehicle Parachute:

try da next thing

1) make a empty para nd set it 2 flying nd name it
2) make a vehicle nd name it

now make da next script
Code: [Select]
_para = _this select 0
_veh = _this select 1

#loop

_veh setpos [getpos _para select 0,getpos _para select 1,(getpos _para select 2)-0.5]
? getdammage _para > 0 : _para setdammage 0
? getpos _para < 2 : exit
~0.001
goto "loop"


now exec it like dat

[nameofpara,nameofvehicle] exec "nameofscript.sqs"

-----------------------------------------

someone else wrote this, replace the vehicle with an ammo crate loaded with what u want in it, and it should do fine. You might have to mess around with the height variable, you want the crate to look further down in the script change the number -0.5 maybe.. :

_veh setpos [getpos _para select 0,getpos _para select 1,(getpos _para select 2)-0.5]

change it to -1 or -2 or what ever looks right
« Last Edit: 19 Sep 2002, 03:09:31 by Mike »

RedKnyte

  • Guest
Re:Paradrop ammo?
« Reply #3 on: 19 Sep 2002, 13:13:15 »
Yeah, I get the picture mike but.......I don't really get about what the script does, I know it will para the ammo, but is the ammo going to be hanging in midair under the plane itself? (Give me the full description of how this whole thing works......)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Paradrop ammo?
« Reply #4 on: 19 Sep 2002, 14:44:30 »
The ammo will sit quietly in a corner of the map until the script is called.    (It will not be hanging in mid air ... unless you want it to of course. :)   Then it will be teleported to just underneath the parachute.    As the chute falls the position of the ammo is adjusted to keep it just under the chute.      The -0.5 means half a metre under the chute, which may not be the right distance - you'll have to experiment.

The script also checks to see if the para has been damaged and repairs it if it has.    The script ends when the para is less than 2m from the ground, though I'm not convinced by the syntax of that line ... but then I'm not a script expert.

The secret - as with all these things - is to try it and see what happens.  If it doesn't work play with a bit.    If that doesn't work come back here and tell us precisely what's going wrong.    The command reference guides and scripting tutorials available in the Ed Depot will help you understand what the commands mean which will help you understand the script.    

To get you started ...

_para is a local variable which applies only to this script ... means you can use the script lots of times with different vehicles/paras without changing it.

~0.0001 is a small time delay

? .... : .... is the if-then command.

As I said, I don't know much about chutes but I suspect it starts to fall the moment its created, so you may have to use the createVehicle command to create it just below/behind the Hercules at the right moment.
Plenty of reviewed ArmA missions for you to play

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Paradrop ammo?
« Reply #5 on: 19 Sep 2002, 16:30:22 »
dis script was created by me nd its changed since den here is da curent script

Code: [Select]
_para = _this select 0
_veh = _this select 1

#loop

_veh setpos [getpos _para select 0,getpos _para select 1,(getpos _para select 2)-0.5]
? getdammage _para > 0 : _para setdammage 0
? getpos _para select 2 < 2 : exit
~0.001
goto "loop"

i think dat da -0.5 high is not good but u wil have 2 expirement

exec it as mike said

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

RedKnyte

  • Guest
Re:Paradrop ammo?
« Reply #6 on: 20 Sep 2002, 10:14:27 »
Well,I haven't tried it :-[....I was about to when I decided to log on to OFPEC Forum and see the answers I got from you people.....I decided to change the script when I saw LCD's current script ;D.....I'll reply again when I've tried it but I read the script (I understood some parts of the script) and I guess it could work......