Jump to content
Quengis

Making car undrivable

Recommended Posts

Hello,

I am making this scenario that you escape the hostage base. There is a problem. If the person jumps on the truck that is next to the base, he is cheating. How do I disable the person from getting into the truck? 

Share this post


Link to post
Share on other sites

Stick some traffic cones around it and then set the fuel to zero?

That way your escapee may waste some valuable time.

Share this post


Link to post
Share on other sites

To prevent them from getting into the truck altogether (although the traffic cones idea sounds good for a laugh), in the editor right-click on the vehicle and go to Attributes, then under Object: States change Lock from Default to Locked (or Locked for players).

Share this post


Link to post
Share on other sites

Lock it? You can do from in the in-game editor. If the vehicle is placed there, otherwise this is what you are looking for:

https://community.bistudio.com/wiki/lock

You can also do it via script or init for example.

truck1 lock 2;

The vehicle would need to be named "truck1" of course.

Share this post


Link to post
Share on other sites

Can't you just get AI to drive it - they will bash the shit out of it on a rock, lamppost, wall etc and THAT will make it undriveable!

  • Haha 2

Share this post


Link to post
Share on other sites
2 minutes ago, kremator said:

Can't you just get AI to drive it

Or me.

  • Haha 1

Share this post


Link to post
Share on other sites

When you spawn the vehicle enableSimulationGlobal false;

Share this post


Link to post
Share on other sites
On 10-10-2017 at 1:24 AM, mvbovien said:

Hello,

I am making this scenario that you escape the hostage base. There is a problem. If the person jumps on the truck that is next to the base, he is cheating. How do I disable the person from getting into the truck? 

 

Why is everybody trying to confuse this dude?

 

Yes you want to lock the vehicle no you don't wanna do this by a script when u can do it with 3 mouse clicks.

Right click at the car go to properties and put the car on "LOCKED", now you gonna need to know when to unlock the car.

As from your example lets add it at the moment you freed the hostages so add this into that trigger: Truck1 setVehicleLock "UNLOCKED";

You don't "need" to name the truck but it does help a big deal since you always know what is what.

And since when you don't name it you need another way of telling the code which vehicle to unlock so lets call it Truck1 for this example.

 

47 minutes ago, mgtdb said:

When you spawn the vehicle enableSimulationGlobal false;

 

Never put the simulation off especially with the door unlocked since the player will see weird things...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×