OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: lee on 21 Dec 2008, 18:07:12
-
Hi troops this is my first post on the forum so it's bit of a biggy. First off i have very little to nil knowledge of Scripting, just to give u a heads up first lol. So what a friend and myslef have done have created a 24 town evolution fixed all the wee niggly bugs.
However what we want to do is Lock certain Vehicles to specific classes ie only pilots which we have added can only fly Harriers/A10's/Cobras and FFAR LB's. So that ie Standard Troops cant just jump in a Cobra and bugger of with it. What were trying to reinforce on our server is Team work, so the best way is to lock of specific vehicles to specific classes, and so far no one has gave me a idiot proof explanation me being the idiot.
So any help would be very very very appreciated :D
-
A long long time ago there was this team named Ballistic Addons Studio that modded OFP to new heights...
Now they are not too active, but they continue to bring us some goodie every now and then...sooo:
Ballistic Addons Studio presents...BAS f (http://www.ofpec.com/ed_depot/index.php?action=details&id=537&game=ArmA)!!! :clap: :good:
Considering you're quite new, I'd suggest looking at that. It contains lots of goodies, and you'll probably learn a lot by using it...and guess what, they have EXACTLY what you're looking for ;)
-
Yup i have it but i really dont have the know how, in how to use it kinda way over my head :no: So if theres any scripting whizzes out there who would be willinn gto helpa total noob for an hour or two i would very happy cause im at the pulling my hair out stage :scratch:
-
You can also use the codepad: http://www.ofpec.com/ed_depot/index.php?action=details&id=539&game=ArmA
Whoever knows the code can unlock the vehicles.
-
Might be worth a bash asthe BAS -f isnt really designed to work with already existing missions/maps its more aimed at folsk starting from scratch hence why some of the info is well confusing to say the least.
-
What about use a getIn EventHandler, add this to the init of vehicle's in question.
this addeventhandler ["getin", {_this execVM "pilotcheck.sqf"}];
pilotcheck.sqf
_vehicle = _this select 0;
_position = _this select 1;
_unit = _this select 2;
if (not(_position == "driver")) exitWith {hint "you are a passenger";};
if(_unit iskindOf "SoldierWPilot") then
{
Hint "you are the pilot";
}
else
{
hint "you are not a Pilot, get out";
unassignVehicle _unit;
[_unit] orderGetIn false;
_unit action ["EJECT", _vehicle];
};
I hope that helps
Odin