Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q:Removing All interaction on a unit/Object #6873

Closed
jones140 opened this issue Mar 16, 2019 · 9 comments
Closed

Q:Removing All interaction on a unit/Object #6873

jones140 opened this issue Mar 16, 2019 · 9 comments
Milestone

Comments

@jones140
Copy link

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]

Steps to reproduce:

  • N/A

Where did the issue occur?

  • N/A

Additional information:

  • N/A

RPT log file:

  • N/A.
@PabstMirror PabstMirror added this to the Ongoing milestone Mar 17, 2019
@PabstMirror
Copy link
Contributor

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;

@jones140
Copy link
Author

jones140 commented Mar 17, 2019

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

@Whigital
Copy link
Contributor

Whigital commented Mar 26, 2019

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.

@commy2
Copy link
Contributor

commy2 commented Mar 26, 2019

Pabst posted the answer already. Close?

@jones140
Copy link
Author

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

@commy2
Copy link
Contributor

commy2 commented Mar 26, 2019

What's wrong with what Pabst posted?

@jones140
Copy link
Author

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]

@commy2
Copy link
Contributor

commy2 commented Mar 26, 2019

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;

@jones140
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants