papagramps

[solved] Alternate Lockers?

9 posts in this topic

Hey guys!

I was wondering if anyone has figured out how to use an alternate model for the lockers?

I'd like to set up a banker trader so to speak using the cash desk and an NPC behind it if at all possible.

Thanks in advance!

Edited by papagramps

Share this post


Link to post
Share on other sites

The code that links the lockers to the locker dialog is in the config.bin file (exile client files) so you are not able to edit it.

Spoiler

	class Exile_Locker : NonStrategic {
		scope = public;
		author = "Exile Mod Team";
		displayName = "Locker";
		model = "\exile_assets\model\Exile_Locker.p3d";
		destrType = "DestructNo";
		
		class EventHandlers {
			init = "";
		};
		
		class UserActions {
			class play {
				displayName = "Inventory";
				position = "left";
				radius = 3;
				onlyForPlayer = 1;
				condition = "true";
				statement = "this call ExileClient_gui_lockerDialog_show";
			};
		};
	};

 

What you could do is add a menu item to the cash desk (or what ever item/npc you want to). In the object's initialization add this...

Spoiler

this addAction["Bank", "this call ExileClient_gui_lockerDialog_show", nil, 6, True, True, "", "(_target distance _this) < 4"]

 

I am not 100% sure this code will work, the code to add a menu item should, im just not sure on the "this call ExileClient_gui_lockerDialog_show". You might have to make a file that does that and just call the file from the menu

Share this post


Link to post
Share on other sites
Advertisement

SOLVED!

Turns out I had to add the addAction parts into the CfgInteractionMenus in config.cpp

Spoiler

    class ATM
    {
        targetType = 2;
        target = "Land_Atm_01_F";
        class Actions
        {
            class Locker: ExileAbstractAction
            {
                title = "ATM";
                condition = "true";
                action = "_this call ExileClient_gui_lockerDialog_show";
            };
        };
    };

not sure if it's required, but I also defined "ExileClient_gui_lockerDialog_show" in CfgExileCustomCode, which is an unedited file from the original in exile_client.pbo

 

Models loaded in via initServer.sqf

Edited by papagramps
  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, papagramps said:

not sure if it's required, but I also defined "ExileClient_gui_lockerDialog_show" in CfgExileCustomCode, which is an unedited file from the original in exile_client.pbo

No its not. Effectively what you have done is move the file from @exile to your mission file but not change anything in it. Will work fine leaving it in @exile

  • Like 1

Share this post


Link to post
Share on other sites

Almost got it!

Just have the cash pile and laptop slightly sinking into the desktop still...

I had to spawn them, the desk, and the safe in via mission.sqm and it doesn't seem to make a difference when I change the z coordinates.

:-\

107410_20160707185158_1.png

Share this post


Link to post
Share on other sites

Could always try attaching the laptop and cash to the desk like the devs have done with the fast food trader.

    _cashDesk = "Land_CashDesk_F" createVehicleLocal [0,0,0];
    _cashDesk setDir 100.26;
    _cashDesk setPosATL [7367.61,5317.67,8.71568];

    _microwave = "Land_Microwave_01_F" createVehicleLocal [0,0,0];
    _cashDesk disableCollisionWith _microwave;         
    _microwave disableCollisionWith _cashDesk; 
    _microwave attachTo [_cashDesk, [-0.6, 0.2, 1.1]];

    _ketchup = "Land_Ketchup_01_F" createVehicleLocal [0,0,0];
    _cashDesk disableCollisionWith _ketchup;         
    _ketchup disableCollisionWith _cashDesk; 
    _ketchup attachTo [_cashDesk, [-0.6, 0, 1.1]];

    _mustard = "Land_Mustard_01_F" createVehicleLocal [0,0,0];
    _cashDesk disableCollisionWith _mustard;         
    _mustard disableCollisionWith _cashDesk; 
    _mustard attachTo [_cashDesk, [-0.5, -0.05, 1.1]];

 

Share this post


Link to post
Share on other sites

For some reason, I couldn't get the desk, cash pile, laptop, and safe to spawn in via initPlayerLocal.sqf

Only Niko and the chair he's sitting in worked that way.

Maybe it's the desk at fault?  I'll try another model and see what happens.

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.