Home   Help Search Login Register  

Author Topic: Adding vehicles to parachutes.  (Read 5106 times)

0 Members and 5 Guests are viewing this topic.

BlackDeath-CFH

  • Guest
Adding vehicles to parachutes.
« on: 07 Sep 2002, 18:52:36 »
ok im working on a parachute mission but i want to attach these behicles to a parachute so they drop down with us, i looked in the script section and the ones i could get to work wernt the kind of scripts i was looking for. is there just a simple script that lets you attack a vehicle to a parachute?

Waterman

  • Guest
Re:Adding vehicles to parachutes.
« Reply #1 on: 07 Sep 2002, 19:01:36 »
Correct me if im wrong but doesn't OFP treat a parachute like a vehicle.  It would be like trying to put a vehicle in another vehicle. Just like the same problem with helos carrying jeeps.

When you want a soldier to move into the parachute, you use the command: aP moveInDriver Para1 (or whatever it is!)

Just a thought,
Waterman. :)

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #2 on: 07 Sep 2002, 19:14:25 »
1. well your wrong because it sure as hell looked like a abrams being dropped by a parachute (even though thats impossible in real life..)

2. i know how to make a soldier get in a parachute, what im asking for is a VEHICLE

3. dont bother replying if you dont have the right awnser, if you do it will be greatly appriciated

T.S.C.Plage

  • Guest
Re:Adding vehicles to parachutes.
« Reply #3 on: 07 Sep 2002, 19:18:37 »
Mmmmh, not sure but if you setpos a vehicle half a meter below the parachute it should work (no contact).

But I think a parachute isn't starting to descend if you haven't attached it a unit so it keeps staying in the height you've created it but the can be changed with a script which setposes the parachute and vehicle to -1 meter (or whatever) each second!?!

Should look like this:
jeep = "jeep" createvehicle [ 3000, 1500 , 49 ]
parachute = "parachute" createvehicle [ 3000, 1500 , 50 ]
~1
jeep setpos getpos [ 3000 , 1500 , 48 ]
parachute setpos getpos [ 3000 , 1500 , 49 ]
~1
jeep setpos getpos [ 3000 , 1500 , 47 ]
parachute setpos getpos [ 3000 , 1500 , 48 ]


...and so on. But I haven't tested it and don't know if it works, looks good or even if there's a better way existing. ;)

Btw, I'm not sure about the distance between the parachute and the jeep. Maybe it has to be 3 meters and that maybe don't looks good.

Greetz
Plage

Waterman

  • Guest
Re:Adding vehicles to parachutes.
« Reply #4 on: 07 Sep 2002, 19:22:26 »
Hey - cool it! 8)
I was trying to help. I might have misread the question but hey, everyone makes mistakes. :)

Hope you find your answer...

Waterman. :)

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #5 on: 07 Sep 2002, 19:46:19 »
Mmmmh, not sure but if you setpos a vehicle half a meter below the parachute it should work (no contact).

But I think a parachute isn't starting to descend if you haven't attached it a unit so it keeps staying in the height you've created it but the can be changed with a script which setposes the parachute and vehicle to -1 meter (or whatever) each second!?!

Should look like this:
jeep = "jeep" createvehicle [ 3000, 1500 , 49 ]
parachute = "parachute" createvehicle [ 3000, 1500 , 50 ]
~1
jeep setpos getpos [ 3000 , 1500 , 48 ]
parachute setpos getpos [ 3000 , 1500 , 49 ]
~1
jeep setpos getpos [ 3000 , 1500 , 47 ]
parachute setpos getpos [ 3000 , 1500 , 48 ]


...and so on. But I haven't tested it and don't know if it works, looks good or even if there's a better way existing. ;)

Btw, I'm not sure about the distance between the parachute and the jeep. Maybe it has to be 3 meters and that maybe don't looks good.

Greetz
Plage


so what exactly do i do with that? i tried putting it in a .sqs and executing it with a trigger, but that did not work.

T.S.C.Plage

  • Guest
Re:Adding vehicles to parachutes.
« Reply #6 on: 07 Sep 2002, 22:47:10 »
Mmmmh, as I told you I haven't tested it and what I wrote is only a short part of what you've to write (want to make it touch the ground you've to go on till 0 meters).

Also the position (here X3000/Y1500) may not fit to your mission so you've to take a look in the mission.sqm and copy the coordinates you need.

It was just a thought!!!

Greetz
Plage

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #7 on: 07 Sep 2002, 23:38:37 »
well then i dont know what to do, im not that advanced. i only know how to do a few things in the editor.

DeusRich

  • Guest
Re:Adding vehicles to parachutes.
« Reply #8 on: 08 Sep 2002, 03:20:07 »
this would be very hard to do... it may be possible, because a parachutes engine must be turned on - otherwise it is collapsed and descends very very very rapidly - to turn the engine on you need some1 in the drivers seat, or just in the parachute basically. i am not sure how to do this - but one way...

Code: [Select]
_g1 = _this select 0

_parachute = createvehicle "parachute" [getpos g1 select 0, getpos g1 select 1, 50]

_jeep = createvehicle "jeep" [getpos _parachute select 0, getpos _parachute select 1, (getpos _parachute select 2)-1]

#loop
_jeep setpos [getpos _parachute select 0, getpos _parachute select 1, (getpos _parachute select 2)-1]
_howhigh = getpos _jeep select 2
?(howhigh =< 0.5):_jeep setdammage 0
?(howhigh =< 0.5):exit
~0.2
goto "loop"

so what this does, is firstly gets the positiopn of a gamelogic (that must be called to the script - when you execute it, put the name of the gamelogic in the [] - ie: [gamlogic] exec "para.sqs")
then, it makes sure your jeep stays 1 metre below the parachute at all times, and when the jeep is less than 50m cm off ground, it just ends the script...

btw - you have to rename script files .sqs for them to work - from johann's great tut
"remember:
.sq(m) = (m)ission
.sq(s) = (s)cript"


hope this helps...

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #9 on: 08 Sep 2002, 07:32:36 »
this would be very hard to do... it may be possible, because a parachutes engine must be turned on - otherwise it is collapsed and descends very very very rapidly - to turn the engine on you need some1 in the drivers seat, or just in the parachute basically. i am not sure how to do this - but one way...

Code: [Select]
_g1 = _this select 0

_parachute = createvehicle "parachute" [getpos g1 select 0, getpos g1 select 1, 50]

_jeep = createvehicle "jeep" [getpos _parachute select 0, getpos _parachute select 1, (getpos _parachute select 2)-1]

#loop
_jeep setpos [getpos _parachute select 0, getpos _parachute select 1, (getpos _parachute select 2)-1]
_howhigh = getpos _jeep select 2
?(howhigh =< 0.5):_jeep setdammage 0
?(howhigh =< 0.5):exit
~0.2
goto "loop"

so what this does, is firstly gets the positiopn of a gamelogic (that must be called to the script - when you execute it, put the name of the gamelogic in the [] - ie: [gamlogic] exec "para.sqs")
then, it makes sure your jeep stays 1 metre below the parachute at all times, and when the jeep is less than 50m cm off ground, it just ends the script...

btw - you have to rename script files .sqs for them to work - from johann's great tut
"remember:
.sq(m) = (m)ission
.sq(s) = (s)cript"


hope this helps...

......................

Quote
i dont know what to do, im not that advanced. i only know how to do a few things in the editor.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Adding vehicles to parachutes.
« Reply #10 on: 08 Sep 2002, 18:06:03 »
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 select 2 < 2 : exit
_para setdammage 0
~0.001
goto "loop"

now exec it like dat

[nameofpara,nameofvehicle] exec "nameofscript.sqs"

dis script wasnt tested but it should work

LCD OUT
« Last Edit: 12 Sep 2002, 14:46:23 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #11 on: 08 Sep 2002, 19:10:45 »
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"

dis script wasnt tested but it should work

LCD OUT

ok, i took that code and put in in a script named "paravehicle.sqs", now i went into my mission and named the vehicle hm1, then named the parachute pr1, i put the [pr1,hm1] exec "paravehicle.sqs" in a trigger, then the hummers init field, and the paras init field but this is the error i get in-game every time in the upper left hand corner: "getpos _para < 2 |#|'; error type array, expected number

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Adding vehicles to parachutes.
« Reply #12 on: 10 Sep 2002, 20:34:07 »
damn i knew i forgo somthin - nywayz got it  ;)  ;D

K its fixed now - check da post wid da code  ;D

LCD OUT

« Last Edit: 10 Sep 2002, 20:38:54 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

BlackDeath-CFH

  • Guest
Re:Adding vehicles to parachutes.
« Reply #13 on: 11 Sep 2002, 05:25:33 »


[attachment deleted by admin]

Pope_Zog

  • Guest
Re:Adding vehicles to parachutes.
« Reply #14 on: 11 Sep 2002, 11:25:31 »
Put a square bracket ] after the -0.5 instead of the round bracket )

Pope Zog