Jump to content
Sign in to follow this  
spitfire007

How to lock a backpack so that you can't pick it up and wear it. Harder than it looks

Recommended Posts

I am trying to script in a backpack in wasteland and it should be impossible to pick up until all the AI are dead.

I have tried using

_vehicle setVariable ["R3F_LOG_disabled", true, true];
_vehicle setVariable ["objectLocked", true, true]; 

This is fine for stopping it being able to be moved etc .. but you can still take it and wear it.

Is there some way I can script it to lock it to the ground until I am ready to move it ?

Edited by spitfire007

Share this post


Link to post
Share on other sites

Thanks for the idea.

I tried it.

No go.

You can still pick it up.

I suspect it's not possible to lock it in place as you can't stop the inbuilt action menu appearing.

Share this post


Link to post
Share on other sites

If I may ask, why do you want the backpack to be somewhere on the ground when none are supposed to pick it up?

Share this post


Link to post
Share on other sites

It's a UAV Backpack and it's a mission objective. I need it to be locked while all the AI are alive. Then you should be able to pick it up.

Share this post


Link to post
Share on other sites

Do you want the player to be able to see the bag before he/she killed all of the AI?

If so, it might be better to make the backpack spawn when the AI has been killed, like this:

//Bag present condition
!(alive AI1) && !(alive AI2) && !(alive AI3) && !(alive AI4); //

Share this post


Link to post
Share on other sites

I would prefer that the bag is seen. That way the player will know that he/she is in the right area.

---------- Post added at 14:41 ---------- Previous post was at 14:39 ----------

Have you tried enableSimulation?

Hummm ! ... this one might be useful.

I will have to have a go tomorrow as my eyes are hanging out.

Thanks for the help guys.

Share this post


Link to post
Share on other sites

In case EnableSimulation works like HarZach suggested, do this:

Is the mission MP?

if(isServer) then { UAVbag enableSimulationGlobal = false; };

Is the mission SP?

UAVbag enableSimulationGlobal = false;

(UAVbag should be the name you gave to the backpack)

Share this post


Link to post
Share on other sites

What if you attach it to something? I mean, you put a little item on the ground that people can't pick up, then you attach the backpack to it using attachTo, and detach it when you need to pick it up.

Inviato dal mio GT-I9300 utilizzando Tapatalk

Share this post


Link to post
Share on other sites

@Antorugby that would work I think. But it will be nasty. He should try enableSimu first.

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  

×