Jump to content
TeTeT

Setting texture in Eden?

Recommended Posts

Hello,

 

is there a way to set the texture in Eden by script so it persist into the mission preview and exported scenario? I tried using setObjectTextureGlobal on the Eden placed plane, but this is not saved anywhere. Is there maybe a special variable in the object or other way to mimick the 'edit vehicle appearance' capability?

 

Background is that the F/A-18 now has a huge list of 2017 textures and I would like to auto paint the planes on the carrier with the correct squadrons. E.g. if you choose CVN-68 your planes get painted with Nimitz squadron textures, if you use CVN-75 you get different squadron textures, those for the Truman. The populate script of the Nimitz has been modified already for that, but I fail to persist the textures between Eden and mission preview.

 

Cheers,
TeTeT

Share this post


Link to post
Share on other sites

Use setObjectTexture in the object's init script field. Virtual Garage should also work but I don't remember that ever working for me.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, Dedmen said:

Use setObjectTexture in the object's init script field. Virtual Garage should also work but I don't remember that ever working for me.

 

Do you happen to know how to modify the init script field from within Eden by script? The objects/planes are created with the populate script, but I haven't found a way to alter the init field of them.

Share this post


Link to post
Share on other sites

Found it! You can set the Init field with set3DENAttribute now and it doesn't even crash:

 

private _t = "";
{
	_plane setObjectTextureGlobal [_forEachIndex, _x];
	_t = format ["%1 this setObjectTextureGlobal [%2,'%3'];", _t, _forEachIndex, _x];
} forEach _textures;
_plane set3DENAttribute["Init", _t];

 

  • Like 1

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

×