Jump to content
Sign in to follow this  
apex130

is there a way to lock and unlock cars with a code

Recommended Posts

hi there is there a way to lock and unlock cars with a code so if u have the code u can enter and no1 cant in mp

Share this post


Link to post
Share on other sites

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

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_GreatBigTank lock TRUE

Locks unit "_GreatBigTank" and

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_GreatBigTank lock FALSE unlocks it. This doesn't prevent any AI using it though, only players.

Share this post


Link to post
Share on other sites

But it wouldn't lock it globally MP and others wouldn't see it as locked, would need to run serverside

Share this post


Link to post
Share on other sites

The lock command will not prevent a player from ordering his AI into the vehicle. The best way is:

As Bratty says, call the Lock command on the server (or all clients?). But also add an event handler to the vehicle to kick any AI out, if they getin when it's locked.

You could try and move a game logic into the vehicle. That way, the AI on all sides cannot enter the vehicle. Although one side effect of this is, if you try and order your AI into the vehicle with a point and click command. Instead of issuing the GetIn order, you issue an attack  command instead.

There might be some way of fixing this, haven't had chance to try it out.

Share this post


Link to post
Share on other sites

It seems to me like the lock command works globally AND prevents AI from getting in. At least my experiences with it. I remember it wasn't like this in OFP.

Doolittle

Share this post


Link to post
Share on other sites

Yep, looks like it does after a quick test in SP at least.

Good news all round. One less thing to worry about smile_o.gif

Cheers

I was looking at having to create Game Logics grouped with civilians, to fill all the cargo slots. Just to stop AI boarding vehicles for a script based system. Hopefully MP works the same.

Still comes up with the getin option, but anything is better than friendly fire. So I can live with that smile_o.gif

Share this post


Link to post
Share on other sites

Its hard without updated comref isn't it?

I know Killjoy is using the lock feature on his mission Evolution, I just assumed he is calling it serverside.

Same with you Doolittle...aren't you calling it serverside?

In the past this and useractions weren't global, who knows now (can take Doolittles word, he's MP scripting)

Share this post


Link to post
Share on other sites
Quote[/b] ]Its hard without updated comref isn't it?

A bit offtopic, not sure what this has to do with the Comref?

But the the Wiki could certainly be updated with a note about the change in behaviour, for the Lock command in Arma.

Quote[/b] ]In the past this and useractions weren't global, who knows now

Anyone who can be bothered to knock up a quick test mission smile_o.gif

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
Sign in to follow this  

×