Ace3: Q:Removing All interaction on a unit/Object

Created on 16 Mar 2019  路  9Comments  路  Source: acemod/ACE3

Arma 3 Version: stable
CBA Version: 3.9.1
ACE3 Version: 3.12.5

Description:

  • Looking for a Simple Way to remove Interactions on Objects and units as i have 1 object i am using for a arsenal and would like to clear all actions around it to avoid confusions
    -See attached Img for better explination [[https://i.imgur.com/TDRJbYb.jpg](https://i.imgur.com/TDRJbYb.jpg)]

Steps to reproduce:

  • N/A

Where did the issue occur?

  • N/A

Additional information:

  • N/A

RPT log file:

  • N/A.
kinquestion

Most helpful comment

works perfectly cant believe how stupid i was being
thank you again

All 9 comments

This might not be ideal, but it should work.

  1. Add arsenal like normal (ie, this code doesn't add virtual items)
  2. Claim the object, blocking other actions (including the normal arsenal action)
  3. Re-add a new arsenal action that will always run
[bob, bob] call ace_common_fnc_claim; // should prevent any other action that checks canInteractWith

private _action = ["myArsenal", localize "STR_A3_Arsenal", "", {
    params ["_target", "_player"];
    [_target, _player] call ace_arsenal_fnc_openBox;
}, {
    true // don't check canInteractWith
}] call ace_interact_menu_fnc_createAction;

[bob, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;

probably should of explained those interactions are from 3 different objects.
looking for just simple way to remove it from 2 of the objects
it inst a priority of actions problem
eg 1 is a seat with acex sit-down action.
2 is a unit would like to remove all action from him

obj 3 that i have arsenal on is Invisible Wall and is working fine

Looked through the interact code for this too but couldn't find a magic variable.

Maybe add something like:

if (!(_target getVariable ["ace_interaction_interactable", true])) exitWith {false};

to ace_common_fnc_canInteractWith. That would enable the option to set ace_interaction_interactable on objects/units to disable interaction, similar to carrying and dragging.

Pabst posted the answer already. Close?

sadly
even trying Whigital idea i cannot get a unit to not have any interactions
maybe this could be looked at for part of ace options in eden as a check box

What's wrong with what Pabst posted?

i believe what he posted is if it was same object and other actions were in way on one object How ever i just need to remove all Actions from a different object as i stated in my reply [Maybe i am interpreting it improperly sorry]

He posted how to remove all actions from an object. Via init box it would look like this:

[this, this] call ace_common_fnc_claim;

works perfectly cant believe how stupid i was being
thank you again

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thirald picture thirald  路  3Comments

SimichRE picture SimichRE  路  3Comments

TheNightstalk3r picture TheNightstalk3r  路  3Comments

DieselJC picture DieselJC  路  3Comments

Herbiie picture Herbiie  路  3Comments