OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Binary on 30 Mar 2008, 18:17:40
-
Hi all :)
As you propaly guessed i'm new here - so sorry if it is the wrong forum ;)
I'm looking for a very very simple script for simply placing a parachute on vehicles, like the old OFP scripts.
The script simply needs to place a chute on two UAZ's upon mission start, no radio command, no map-clicky or anything.
I've tried out both of the old OFP scripts for this, as well as searched the OFPEC and BI forums extensively, but i haven't found anything applicable yet.
When i use the old OFP scripts the vehicles seem to.. "hover" in the chute, they drop a bit, then jumps up 5 meters and down again, never touching the ground...
Anyone?
-
dude, you can always un-pbo Evo to get that script from the ammo crate call....
-
It needs to be without map-click or point cost or anything.
#EDIT: Removed the unnecessary quote h-
-
The way it works in Evo I believe is that you createVehicle a parachute and another other object (ammobox in Evo) you want to drop. You can't actually moveInDriver a non-person unit into a parachute (I think). Instead you setPos them exactly at the same position (including Z-axis) and then you then rapidly setPos them both lower and lower to the ground in a loop to simulate the object floating down in the chute.
Good luck!
-
Something like this?
// drop_car.sqf
// [position_desired]execVM"drop_car.sqf"
// Example:
// [[getPos player select 0,getPos player select 1, 100]] execVM "drop_car.sqf"
_pos = _this select 0;
_myvehicle = "UAZ" createVehicle _pos;
_myvehicle setPos _pos;
// Change dist between chute and car at will
_dist = -2;
_mychute = "ParachuteWest" createVehicle getPos _myvehicle;
_mychute setPos getPos _myvehicle;
while {(getPos _myvehicle select 2) > 0} do
{
_myvehicle setPos (_mychute modelToWorld [0,0,_dist]);
_myvehicle SetVectorUp (vectorUp _mychute);
sleep 0.01;
};
-
This is done with an ammo box in JasonOs Air Supply (http://www.ofpec.com/forum/index.php?topic=29090.0) script already (though if I remember, I had to fix it so that it worked properly). It creates a gamelogic to "sit" in the parachute, which makes it fall correctly, while the ammo box is setPosed just below the chute. It isn't a great implementation, but you should get the idea.
-
Something like this?
...
Mandoble.... YOU ROCK ! :good:
Will test it out once i get home.
This is done with an ammo box in JasonOs Air Supply (http://www.ofpec.com/forum/index.php?topic=29090.0) script already (though if I remember, I had to fix it so that it worked properly). It creates a gamelogic to "sit" in the parachute, which makes it fall correctly, while the ammo box is setPosed just below the chute. It isn't a great implementation, but you should get the idea.
The download link for JasonO's Air Supply Script points to a dead .zip file (0 byte).
-
Hmm, you are right. Although the version you can download from the beta thread is fine, it is broken (1.0). The working 1.1 version that was attached to the resource is a 0 byte file for me too! I don't have a copy of the working version on this machine so I can't re-upload it right now. Maybe someone else could look into this? Mandoble? Hoz?
Anyway, the common problem in this type of script is that the object being dropped, if setpossed too close to the parachute, can cause the parachute to bump into it and thus interfere with the fall of the parachute. So, if you get odd falling behaviour, just try with the ammo box setposed a bit lower until the parachute works properly.
-
Sounds good :)
The script Mando posted, would this work on a dedicated server ?
If i understood it correctly - empty vehicles are local to the server, so it should work no problems right?
#EDIT: Removed the unnecessary quote h-
-
Well, all vehicles that don't contain a player or an AI commanded by a player (where player is leader to a group of AI), would be local to the server, yes.
You'd just need to play around with the value of _dist until the parachute dropped correctly, but the vehicle didn't look too far away from the chute.
I suspect, though I'm not sure, you might have to add a gamelogic inside the parachute in order for it to think it has a person inside so that it will fall properly. As I say, though, this might not be necessary, so don't bother unless you have problems. If you do this, you'd also want to remember to delete the gamelogic you created after it has hit the ground (at the end of Mandoble's script).
_parachutist = "logic" createVehicle [0,0,0];
_parachutist moveInDriver _mychute;
-
GL as driver, not needed at all, while it will not hurt the script.