Page MenuHomeFeedback Tracker

addAction selections does not support "door_x_trigger"
New, NormalPublic

Description

addAction should support more LODs, it is currently impossible to add action to memory points such as Door_x_trigger or sling load points

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

obj addAction [
"Action",
{ hint "Action used"; },
nil,
100,
true,
false,
"",
"true",
1,
false,
"Door_1_trigger"
];

Event Timeline

Jaffa created this task.Oct 15 2017, 8:03 PM
Wulf added a subscriber: Wulf.Oct 17 2017, 4:52 PM

Hello.

The last parameter is a selection in geometry it is not a memory point. It would be hard to check if the player is looking at a specific point of an object. It must be an area.

Jaffa added a comment.Oct 17 2017, 4:54 PM

How does UserActions in CfgVehicles work in this regard? It specifies Door_x_trigger in it's open/close door actions but this selection does not work in the scripted addAction command.

Wulf assigned this task to JiriWainar.Oct 17 2017, 5:40 PM

Hi there. Actions cannot be added to memory points by script not can they be added via object config.

UserActions in CfgVehicles can work in two ways, depending if they use old or new tech. Old technology worked the way that player got the action available as long as he was looking on the object and was within "distance" from object "position" (that's the memory point door_1_trigger you are referring to). This got some issues, mainly problematic detection of what should be default action of player got into distance of multiple user actions belonging to object he is looking at (common for doors in house). The new tech that is going to be deployed allows for much more precise detection. Instead of checking if player is looking at object and is within distance to given memory point, it is checking in given selection (stored in config under parameter "actionNamedSel") is under cursor. Distance is measured from the plane / surface of the selection.

How can you tell what tech is used?
If you there is "actionNamedSel" parameter in the user action, then game will use the new tech.

So what's with the memory points?
It was never possible to attach user action to memory point. Would be quite nasty to require from player to look on the point. :) It was used to check if player is in the valid distance.

AFAIK the new tech is going to be deployed with the new Tac-Ops DLC. Documentation should follow.

Hope this answers your questions.

Jaffa added a comment.Oct 17 2017, 6:21 PM
This comment was removed by Jaffa.
MDCCLXXVI added a subscriber: MDCCLXXVI.EditedOct 18 2017, 5:58 AM

while this is hot, can we have a look at https://community.bistudio.com/wiki/getCursorObjectParams distance return? distance return can be incorrect due to max range. it should have a default value of 9999 or something otherwise impossible, to help with script sanity checks.

example:

A- Character looks at something nearby (distance = 2)
B- Character looks at something further away (distance = 300)

getCursorObjectParams can return something like this:

[<far away object (B) > , <named selection> , <distance to nearby cursor object (A)>]

debug code:

onEachFrame {   hintSilent str getCursorObjectParams; };

Try looking at a distance object through a bush or transition from a nearby object to very far object, to reveal the issue.

Players on my server have reported the issue, whereby they could get an addAction on a distant object, since transitioning to "getCursorObjectParams" instead of cursorobject + (player distance cursorobject)

Screenshot to see the issue:

  • note the hint in the top right
  • I first focused on the bush, then focused on something far away. distance return remained with distance to bush. Please have it default to 9999 or something.

https://steamuserimages-a.akamaihd.net/ugc/865114455016234928/AB724CFC8175868A1372FD5D7C89D63C2267379A/

Two more screenshots, note the distance return in the hint box

https://steamuserimages-a.akamaihd.net/ugc/865114455016242477/D684D4707CFF41D4DEF1353D7F0CA84189107DC4/
https://steamuserimages-a.akamaihd.net/ugc/865114455016241956/49EB0B3491C0FE79AC3F7773D5D8CF975A834166/

Hi, what's the revision of the exe, you are using? I cannot reproduce the issue, it works as described on the community wiki.

If object is further away then 50m or there is no object under cursor, then object reference gets NULL and distance is 1e10.

Update: Command should already be fixed in dev. exe. Next version of retail exe (Tac-Ops DLC release) should have it fixed.

There is a further issue of addAction not working when the player is >15 metres of object centre regardless of selection position and radius.
https://feedback.bistudio.com/T126959