Page MenuHomeFeedback Tracker

set3DENAttributes and init does not work
Closed, ResolvedPublic

Description

When trying to use set3DENAttributes for setting the init field of an object, the string is placed there 1:1. This does not work, as the init field expects some sort of SQF code.

Example:

set3DENAttributes [ [ [_veh], "Init", "this animate [""l_wingfold"", 1, true]; this animate [""r_wingfold"", 1, true];" ] ];

leads to this init field:

"this animate ["l_wingfold", 1, true]; this animate ["r_wingfold", 1, true];"

expected result would be:

this animate ["l_wingfold", 1, true]; this animate ["r_wingfold", 1, true];

Details

Legacy ID
1057676124
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Eden Editor
Steps To Reproduce

Run the script above on a F/A-18 plane from John_Spartan/Saul. The game throws an error because of the quotes around the code in the init field.

Additional Information

Happens on RC, not tried on dev.

Event Timeline

TeTeT edited Steps To Reproduce. (Show Details)Feb 13 2016, 2:11 AM
TeTeT edited Additional Information. (Show Details)
TeTeT set Category to Eden Editor.
TeTeT set Reproducibility to Always.
TeTeT set Severity to None.
TeTeT set Resolution to Fixed.
TeTeT set Legacy ID to 1057676124.May 8 2016, 1:43 PM
Larrow added a subscriber: Larrow.May 8 2016, 1:43 PM

Same problem with the singular command.
_unit = get3denselected "object" select 0; done = _unit set3DENAttribute ["Init","hint 'spammin ur hint'"];

(get3DENSelected "object") select 0 get3DENAttribute "Init";

Returns
[""hint 'spammin ur hint'""]

Update: RC build ["Arma 3","Arma3",156,134594,"Stable",false,"Windows"]
This is a problem with any Attribute class that is of type STRING.
Tried..
Name
Description
Rank

All either, fail to make any change or fill the attribute with a double quoted string, which then cause errors when you try to open the attributes window and then close it as the values are illegal when evaluated.

Hello and thank you for your feedback. I will fix it ASAP ;-)

Problem will be fixed in revision 134599 so pretty much today or tomorow DEV. It was also added to merge queue for stable ;)

TeTeT added a subscriber: TeTeT.May 8 2016, 1:43 PM
TeTeT added a comment.Feb 18 2016, 6:34 PM

Thanks for the quick fix! Unfortunately I now experience a game crash with the above change of the init line. When I enter it manually in Eden it works, though.