Jump to content
  • 0

Adding vehicles to the map that players can't use


BetterDeadThanZed

Question

Is it possible for me to add some vehicles to my map edits that players can't interact with? I'm thinking for things like my field hospitals, I might want to put a hummer ambulance sitting there to add to the atmosphere, but I don't want players to be able to get into it, damage it or strip it. I want to add it via the editor. Is this possible?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

This is how Vampire does it for the mission vehicle:

//And lets keep people out
_wreck setHit ["motor", 1];
_wreck setVariable ["R3F_LOG_disabled",true,true];
_wreck setVariable ["BTC_Cannot_Lift",true,true];
_wreck removeAllEventHandlers "Killed";
_wreck removeAllEventHandlers "HandleDamage";
_wreck setVehicleLock "LOCKED";
_wreck removeAllEventHandlers "GetIn";
_wreck addEventHandler ["GetIn",{
	if (isPlayer (_this select 2)) then {
		(_this select 2) action ["getOut",(_this select 0)]; 
		(_this select 0) setVehicleLock "LOCKED";
		(_this select 0) removeAllEventHandlers "GetIn";
	};
}];
Link to comment
Share on other sites

  • 0

 

This is how Vampire does it for the mission vehicle:

//And lets keep people out
_wreck setHit ["motor", 1];
_wreck setVariable ["R3F_LOG_disabled",true,true];
_wreck setVariable ["BTC_Cannot_Lift",true,true];
_wreck removeAllEventHandlers "Killed";
_wreck removeAllEventHandlers "HandleDamage";
_wreck setVehicleLock "LOCKED";
_wreck removeAllEventHandlers "GetIn";
_wreck addEventHandler ["GetIn",{
	if (isPlayer (_this select 2)) then {
		(_this select 2) action ["getOut",(_this select 0)]; 
		(_this select 0) setVehicleLock "LOCKED";
		(_this select 0) removeAllEventHandlers "GetIn";
	};
}];

 

i belive if you get rid of the if(isplayer it should throw out ai aswell ...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...