Home   Help Search Login Register  

Author Topic: Spawn in midair  (Read 913 times)

0 Members and 1 Guest are viewing this topic.

MPKING

  • Guest
Spawn in midair
« on: 08 Jun 2003, 20:46:12 »
I'm trying to make a mission with US Marines being airlifted and parachutes down to a beach (it's the first step to an invasion of a soviet occupied island) and the marines first objective is to hold the beach while armored support is beeing flown in.
The problem is i wan't M1A1's to be parachuted from C130's and i have tried using David Berka's Helidrop script for it, and it works fine except that when the C130 makes a little turn in the air it collides with the M1A1 hanging under it and both crashes into the sea.
So i was wondering is there any way i can spawn a M1A1 in midair hanging in 4 parachutes??? ???

Btw. is it even possible in real world to parachute an MBT? Or should i use
lighter APC's instead?

Ace

  • Guest
Re:Spawn in midair
« Reply #1 on: 08 Jun 2003, 20:57:36 »
Check the new comref for Createvehicle

And yes choppers can airlift tanks (not by a small rope hanging under a chopper of course, thats just OFP limitations)

MPKING

  • Guest
Re:Spawn in midair
« Reply #2 on: 08 Jun 2003, 22:24:59 »
Ok.. first Thank you very much for the quick responce
but i'm a bit of a newbie to mission editing.
I've checked OFPEC for a new Cref and if i found the right place it says something like this Quote:

type createVehicle pos
Operand types:
type: String
pos: Array
Type of returned value:
Object
Description:
Create empty vehicle of given type. Pos is in format Position. See CfgVehicles for possible type values.

Example:
_tank = "M1Abrams" createVehicle getmarkerpos "tankFactory"

That's cool..  i know now how to spawn a vehicle at a location.

But it it doesn't say anything about  how i get the abram's
to spawn In an altitude of 200 m or how i spawn the 4 parachute's it should be attached to

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Spawn in midair
« Reply #3 on: 08 Jun 2003, 22:26:56 »
I don't think a Hercules can even carry an Abrams, never mind paradrop one.   But hey, that's a technicality. ;D   I think a Herc could probably manage a Bradley.      

You can create the tank out of the way somewhere and then use setPos (possibly even in its own init field) to move it to the desired height/spot.     I'm sure the parachute thing can be done too, but not quite sure how.    Bet there's a script for it somewhere.
« Last Edit: 08 Jun 2003, 22:29:08 by macguba »
Plenty of reviewed ArmA missions for you to play

MPKING

  • Guest
Re:Spawn in midair
« Reply #4 on: 08 Jun 2003, 23:28:33 »
Thanks for the reply Macguba... i'm currently looking over David Berka's Helidrop script to see if there's some way i can modify it to just attaching the Abrams To the chute's, but i'm not much of a scripting Guru ;D
HELP PLEASE :P

Offline Captain Crunch

  • Members
  • *
Re:Spawn in midair
« Reply #5 on: 08 Jun 2003, 23:38:12 »
Hi MPKing!


   You Wrote:

Quote
Btw. is it even possible in real world to parachute an MBT? Or should i use lighter APC's instead?

Che Guevara's well known quote:
Quote
Let's be realistic and try the impossible.

And here is one from me:
Quote
The one and only impossible thing ever, is impossible itself.

Cheers!

 ;D
Back to the forest!

MPKING

  • Guest
Re:Spawn in midair
« Reply #6 on: 08 Jun 2003, 23:43:25 »
Not very helpfull but thanks anyway... lol

n0mad

  • Guest
Re:Spawn in midair
« Reply #7 on: 08 Jun 2003, 23:46:13 »
There's a script by Skumball available here called "airstrike1.2.zip" that might be a good model for you in solving the spawn problem.  Adding a second spawned object will also be a breeze.  

Example from "airstrike1.2.zip":
;takes the following inserted on map:
;1 Pilot named "strikePilot"
;3 Markers ("spawn","safe","target" all set to 'empty')
;1 Trigger (Activation: Radio Alpha, Repeatedly. Text: Air Strike. On Activation: onMapSingleClick {[_pos] exec "airstrike.sqs"}; strikePilot sideChat "Give me a target")

;(this is the opening of sirstrike.sqs:

_pos = _this select 0

"target" setMarkerPos _pos
"target" setMarkerType "destroy"

strikePlane = "A10LGB" camCreate (getMarkerPos "spawn")
strikePlane setPos [(getPos strikePlane select 0),(getPos strikePlane select 1),(getPos strikePlane select 2)+800]
strikePlane setDir 180


The "this SetPos [(getPos, etc.]" command tweeked so your suspended object is below your C130 or helicopter (ie. - 2.0) shouldn't be too difficult.

I think your attempt to figure it out by looking at other semi-similar scripts is the the way to figure out scripting (the way I've been teaching myself, in conjunction with these forums).


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Spawn in midair
« Reply #8 on: 09 Jun 2003, 13:10:34 »
u wanna attach somin 2 a rop ? simple script wil do

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

#loop
_veh setpos [getpos _para select 0,getpos _para select 1,(getpos para select 2) - 4]
? getpos _para select 2 < 5 : exit
~0.1
goto "Loop"

exec iy - [TankName,PArachuteName] exec "scriptname"

but u wil need 2 create da para nd da tank - nd u wil need 2 put da para in da place u want it 2 para from ;)

also u can use ny oder vehicle not only tank

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

MPKING

  • Guest
Re:Spawn in midair
« Reply #9 on: 09 Jun 2003, 20:51:59 »
Ahh yes... i think this will work.
Thanks for the help all.