• 0

Players can interact with some trader prop items


_objects = 
	etc, etc, etc...

    private ["_object"];

    _object = (_x select 0) createVehicle [0,0,0];
    _object setDir (_x select 2);
    _object setPosATL (_x select 1);
    _object allowDamage false;
    _object enableSimulationGlobal false; // :)
forEach _objects;

I understand that initServer.sqf in the mission.pbo uses the above code to insert prop items into trader zones.  The enableSimulationGlobal false and the allowDamage false commands prevent players from interacting with these items and this works great for most items but not all.

To add a bit of atmosphere, I have added weapons and crates to my custom trader zones (see image attached.)  Players can't double-click or drag and drop any of the rifles sitting on shelves around my armory trader, but they can click on the 'Take All' button which lets them take and use my store prop weapons. 

Is it possible to add a check for items that have enableSimulationGlobal set to false to ExileClient_util_playerCargo_takeAll.sqf to completely stop players interacting with prop items?

I know I could simply stop putting guns on the shelves of my armory trader, but it crates a nice bit of atmosphere and I'd like to keep them if I can.

Thanks heaps...


Edited by speedweasel

Share this post

Link to post
Share on other sites

2 answers to this question

  • 0

I think for now, you will have to change the function in your mission file manually. It might be worth a try, but maybe the "lock" or "setVehicleLock" work on these weapon holders? Also, be sure that our garbage collector does not clean them up. They will de-spawn if they inherit from GroundWeaponHolder or WeaponHolderSimulated. 

Maybe the upcoming "createObject" function will suit that better. Then it's just a model, not an actual vehicle.

Share this post

Link to post
Share on other sites
  • -1

Seems like there is something wrong with your mission file. Any RPT logs?

Share this post

Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.