OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BlackDeath-CFH 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?
-
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. :)
-
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
-
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
-
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. :)
-
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.
-
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
-
well then i dont know what to do, im not that advanced. i only know how to do a few things in the editor.
-
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...
_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...
-
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...
_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...
......................
i dont know what to do, im not that advanced. i only know how to do a few things in the editor.
-
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
_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
-
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
_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
-
damn i knew i forgo somthin - nywayz got it ;) ;D
K its fixed now - check da post wid da code ;D
LCD OUT
-
[attachment deleted by admin]
-
Put a square bracket ] after the -0.5 instead of the round bracket )
Pope Zog
-
[attachment deleted by admin]
-
[attachment deleted by admin]
-
[attachment deleted by admin]
-
Here m8, try this attached script, i used it in a mission a while back to drop ammo crates, but i'm sure it should work for vehicles, it would depend upon what you want to drop i suppose, tanks may be a bit much but jeeps etc should be fine....
yeah i know about that script, i just dont know how to exactly use it.
-
i didnt make ny erors ::)
look @ my first post u just didnt copy it right ;D
nywayz i added a code dat wil keep da para good its just a bug in da ofp engine :)
try it nd report
LCD OUT
-
OK, it's pretty straight forward and most of the instructions on how to use it are included within the script read-me , in my case i used a radio trigger to simulate an ammo drop, this called the script. I can send you a mission sqm that ran this if you like just send me an email and i'll send it over..
-
you didnt include a fucking readme god damnit, and i cant find one for it either
-
OK, it's pretty straight forward and most of the instructions on how to use it are included within the script read-me , in my case i used a radio trigger to simulate an ammo drop, this called the script. I can send you a mission sqm that ran this if you like just send me an email and i'll send it over..
could you send a sqm? because i still cant find the readme for that script. e-mail: lane.nick@lvcm.com
also LCD, the para still breaks and smokes.
-
now im back from my vication so i can write da script nd test it wil report back asap :)
LCD OUT
-
[attachment deleted by admin]
-
ok, i see the problem, the script works fine with a reguler hummer, but im useing this hummer pack that has weapons on it, like a m2, m60 or tow launcher. so i guess it was the problem
-
i think all u need 2 do is 2 make it lower under da para in da setpos command line but im not sure how low it should b :-\
LCD OUT