Belbo 462 Posted June 26, 2016 Now that you can change certain attributes in eden editor it's time to finally have some sort of way to grab these attributes in a script. Let's say you change the colour of a vehicle by choosing the skin in eden and have the vehicle being handled by a respawn script, it will revert to its default colour upon respawn. Is there any way to add the possibility for a respawn script to receive the attributes of a vehicle set in eden and have them applied to the respawned vehicle? Share this post Link to post Share on other sites
Belbo 462 Posted June 28, 2016 No one's got any idea? Could something with https://community.bistudio.com/wiki/getMissionConfigValue work? Share this post Link to post Share on other sites
kylania 568 Posted June 28, 2016 No one's got any idea? Could something with https://community.bistudio.com/wiki/getMissionConfigValue work? That's a good idea, but I don't think Eden Object attributes are covered by that command, just the description.ext duplicate settings like respawn and the like. Seems to be an engine command to speed up config file lookups and grab the Eden settings. Share this post Link to post Share on other sites
Belbo 462 Posted June 28, 2016 Yeah, that's unfortunately quite clear - there isn't even a way to specify the attribute returned. So that's no option. But hopefully there is some other way. I already looked through every variable that's available with allVariables, but to no avail. This doesn't seem to be stored in any reasonable way. One, albeit crude way, would be like this (for the init line, just as example, if we wan't a vehicle to be spawned and respawned with a black skin): this setVariable ["adv_initline","[_this, 'black', nil] call bis_fnc_initVehicle;"]; this call compile (this getVariable "adv_initline"); and then in the respawn script you could store the variable "adv_initline" and apply it to the new vehicle. But that a) is hacky and b) does not apply to the attributes from Eden. Share this post Link to post Share on other sites
Belbo 462 Posted July 5, 2016 I just stumbled upon this page: https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes And even though https://community.bistudio.com/wiki/get3DENAttributeonly works on the standard attributes like name or skill and not for example textures (which is striking me as a bit odd) I really wonder why anyone would only use these commands in the 3den workspace? These are exactly the commands I'd need in the regular game. Share this post Link to post Share on other sites
Larrow 2823 Posted July 5, 2016 And even though https://community.bi...et3DENAttributeonlyworks on the standard attributes like name or skill and not for example textures (which is striking me as a bit odd)Works perfectly fine for any attribute standard or custom... (get3DENMouseOver select 1) get3DENAttribute "objecttexture"in the debug console when moused over an object in Eden. Let's say you change the colour of a vehicle by choosing the skin in Eden and have the vehicle being handled by a respawn script, it will revert to its default colour upon respawn.Use getObjectTextures after mission load to get what textures have been applied, then save them for when you respawn the vehicle. 1 Share this post Link to post Share on other sites
Belbo 462 Posted July 5, 2016 Works perfectly fine for any attribute standard or custom... Well... It's called "skin" in the editor and "texture" in the mission.sqm... If I had a penny for every time I found some sort of inconsistency in a BI product. ;) The getObjectTextures-trick is certainly a good workaround, but objectTexture is only one of many attributes that can be set in 3den. It's a start though. Share this post Link to post Share on other sites
Larrow 2823 Posted July 5, 2016 If the attribute comes under the subtitle Object Specific in the attributes window like textures are then its attribute name can be found under the objects config under attributes(maybe inherited from a based class), the classname is the attribute name. e.g in the case of texture. configfile >> "CfgVehicles" >> typeof _veh >> "Attributes" >> "ObjectTexture"If its a custom attribute something that comes under a different Eden subtitle then it can be found under Cfg3Den under the object type e.g is it an OBJECT, TRIGGER, LOGIC etc configfile >> "Cfg3DEN" >> Object Type >> "AttributeCategories" >> Eden Attribute Subtitle >> "Attributes" >> Attribute Namee.g For a units name, in Eden it can be found in the attributes window under the subtitle Identity. So the config path is configfile >> "Cfg3DEN" >> "Object" >> "AttributeCategories" >> "Identity" >> "Attributes" >> "UnitName"Under this class you may also see an expression property, this is what is run on the server at mission start. e.g for the units name expression = "_this setname _value;";Finding setName on the wiki may lead you to its equivalent getter. Some (mostly user created) set a variable on the server that can be queried for their value. Share this post Link to post Share on other sites
kylania 568 Posted July 5, 2016 Specifically you can disable that randomization via: this setVariable ["BIS_enableRandomization", false]; Share this post Link to post Share on other sites