Dizzturbed

SetVariable ExileTraderType to Objects

2 posts in this topic

Hey guys,

im trying to make a vending machine a trader via the SetVariable but i cant seem to get them working. the vending machnines spawn in just fine, just dont give the option to start trading.
im running the following fnc in the InitPlayerLocal.sqf

private _tradeObj = [
["Land_jbad_vending_machine","Exile_Trader_Food", [6468.22, 7362.57, 291.202], [-0.0659779, -0.997821, 0], [0, 0, 1], false],
["Land_jbad_vending_machine","Exile_Trader_Food", [12108, 12640.1, 160.15], [0.95446, 0.298312, 0.00397602], [0, -0.0133272, 0.999911], false]
];
{
  private _logic = "Logic" createVehicleLocal [0, 0, 0];
  private _object = (_x select 0) createVehicleLocal [0, 0, 0];
  _logic setPosWorld (_x select 2);
  _logic setVectorDirAndUp [_x select 3, _x select 4];
  _object setVariable ["ExileTraderType", _x select 1];
  _object allowDamage false;
  _object enableSimulationGlobal (_x select 5);
  _object setPosWorld (_x select 2);
  _object setVectorDirAndUp [_x select 3, _x select 4];
  _object reveal _logic;
  _object attachTo [_logic, [0, 0, 0]];
}
forEach _tradeObj;

any hint would be appreciated, im kinda lost now =)

thx in advance
diz

Share this post


Link to post
Share on other sites

Maybe you need too add them an addaction like this in you config.cpp

	class TraderFoodAutomat
	{
		targetType = 2;
		target = "Land_jbad_vending_machine";

		class Actions
		{
			class Trade: ExileAbstractAction
			{
				title = "Trade";
				condition = "true";
				action = "_this call ExileClient_gui_traderDialog_show";
			};
		};
	};

I dont know is that working but you will have the Option Trade on this object all on the map or just add on another way this option.

If that working tell it pls :)

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.