Jump to content
syrasia

[SOLVED] available actions (in action menu)

Recommended Posts

Hey,

 

I am spamming the forums a bit today, but just stumbled upon an other headache I can't get a solution to:

How to know what actions are available for player(s)? I know you can't delete BI internal ones, but knowledge about them should be possible, right?

Is there a command I am missing or how can I achieve that? Searching the forums didn't yield results too, unluckily.

Even just if there is a action available at all would help a bit.

 

cheers

Share this post


Link to post
Share on other sites

cfgActions / config tweak

Share this post


Link to post
Share on other sites
9 minutes ago, .kju said:

cfgActions / config tweak

tweak? So I would need to crate/include a mod? Can you explain a bit what you mean with tweak?

 

I need a scripting solution, if possible.

Share this post


Link to post
Share on other sites
5 hours ago, syrasia said:

Can you explain a bit what you mean

 

Hello there syrasia !

 

Can you also provide more information about ?

Share this post


Link to post
Share on other sites
37 minutes ago, GEORGE FLOROS GR said:

 

Hello there syrasia !

 

Can you also provide more information about ?

What exactly do you need?

I am trying (per script) to know if there are any action in the action menu available. Like the "open door" or "grab item" things. If there are any actions (and optimally what actions) available, wenn you scroll the mouse wheel.

Basically I want general information what is available, or is it only possible to know some cases?

Share this post


Link to post
Share on other sites

Yea, I did. But that's only what actions are available general in the game. I need the current action available for the player. Only the one, he could access  with the mousewheel and spacebar.

Share this post


Link to post
Share on other sites

Inspite of editing the certain in an addon , you can add probably some holdactions perhaps instead.

Share this post


Link to post
Share on other sites

Maybe there is a bit of miscommunication: I don't want to add any action at all.

I only want the information in the running game, what actions (if any available) the player could select in his action menu.

 

Here some examples of actions I would like to know if they are available right now for the player:

07D5A1396CF2EFF36017B00F05180D7B71E6194A

Actions available: Close door

 

DBB8863D0DB4188849F4384B25FCBF401E087A6A

Actions available: Take Commoner Clothes (blue), Inventory

 

Can I know (per scripting) what the player can see there? Like is there a variable holding them? Is there a command to know what is available?

  • Like 2

Share this post


Link to post
Share on other sites

like :

On 3/14/2019 at 2:15 AM, GEORGE FLOROS GR said:
  On 10/27/2017 at 9:43 AM, pierremgi said:

Here is a working code for any loot on corpse and lost weapons on ground:

 


inGameUISetEventHandler ["action",
  " _cont = _this select 0;
    _act = _this select 3;
    if  ( {cursorTarget isKindOf _x} count ['CAManBase','weaponHolderSimulated'] > 0
      && _act in ['Rearm','TakeWeapon','Gear','Inventory']
    ) then {true} else {false}
  "
];

 

  • Like 2

Share this post


Link to post
Share on other sites

Yea, exactly along those lines. Thought so, that this could solve my problem. Hence solved. Thanks!

 

Now I have to find my working variation of it.

Share this post


Link to post
Share on other sites

check:

https://www.tacticalgamer.com/forum/simulation/armed-assault/arma-development/script-bin/1802780-kunduz-open-doors-fix

 

Spoiler

Kunduz - Open Doors Fix

02-11-2018, 09:59 AM

Kunduz has a door bug where you can't open them. There is a fixed version out there but is not signed for use on a secure dedicated server. So this is a mission level work around that Dimitrius found somewhere on the webs. We don't know who to credit for this:

initPlayerLocal.sqf

Code:


inGameUISetEventHandler ["action","
  if (_this select 4 == 'Close Door') then {
      _intersects = [cursorTarget, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])];
      {_intersects pushBack _x} forEach  ([cursorTarget, 'GEOM'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]);
      _select_door = format ['%1_rot', (_intersects select 0) select 0];
      cursorObject animate [_select_door, 0];true
  };
 if (_this select 4 == 'Open Door') then {
     _intersects = [cursorTarget, 'VIEW'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])];
     {_intersects pushBack _x} forEach  ([cursorTarget, 'GEOM'] intersect [ASLToATL eyepos player, (screentoworld [0.5,0.5])]);
    _select_door = format ['%1_rot', (_intersects select 0) select 0];
      cursorObject animate [_select_door, 1];true
  };
"];

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Honestly: same idea. As I already mentioned: I need to do my variation of that now.

 

Important part is: the action needs to be executed, to be know. Perfect would have been to "read" them and therefore know them without the player input. But well, this is by far better, than nothing and I only need to slowly find my solution to my goal.

 

The basic concept is very clear (the wiki gives enough info for me to understand the concept).

 

Basically I have to filter the triggered action for my specific cases and then do the work, and if action is "improper", I can block it. Should get me there. 😉

 

Thanks again for your time!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, syrasia said:

Thanks again for your time!

 

This might also help a bit :

inGameUISEH = inGameUISetEventHandler ["Action", "systemchat str (_this select 3); false"];

FL8iTC6.png

 

other ex:

Spoiler

inGameUISetEventHandler ["Action", "call inGameUISEH"];

inGameUISEH = {
    params ["_target", "_caller", "_index", "_action", "_String", "_priority", "_showWindow", "_hideOnUse", "_name", "_visibility", "_event"];

    if (_action in ['Rearm','TakeWeapon','Gear','Inventory']) then {
            hint "Action";
    };
};

 

  • Like 3

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×