Jump to content
Sign in to follow this  
zgmrvn

Replace texture without addon

Recommended Posts

Hi,

For a mission i'm working on, i need to be able to switch opacity of an object from 100% to 50% and vice-versa.

My research brought me to config.cpp which seems to be used to make and configure addons but i do not want players to have to download anything but the mission.

when i've discovered config.cpp i was thinking about something like create a new class which use the same 3d model and the same texture but with an argument in hiddenSelections[] or hiddenMaterialSelections[], then i would be able to replace the texture by setObjectTexture setObjectMaterial, something like that...

A simply retextured object would conciderably increase mission weight.

how can i do this ? thanks :)

Share this post


Link to post
Share on other sites

50% opacity? Huh?

You might use hideObject if you wanna remove an object then bring it back. I don't think textures would make something see through though. What kind of object is this that it partially disappears?

Share this post


Link to post
Share on other sites

using obj settexture [1,""] removes the texture from the bed of the OPFOR truck. I've stuck a sub or a cargo container on it.

The ATV can be totally transparent apart from shadow. But most other vehicles don't seem to use the same texture method.

The other major floor is that disableCollisionWith does not work with vehicle to vehicle/object and so incorrectly placed object can cause damage or unwanted vehicle movement. (Why do they tease us).

http://feedback.arma3.com/view.php?id=7842

Edited by F2k Sel

Share this post


Link to post
Share on other sites

@kylania: hideObject do not match with the effect i want. I need an half transparency of the object.

@F2k Sel: i think you mean setObjectTexture, but if there is nothing in hiddenSelections array of the object, nothing happen.

see what i'm trying to do:

objectOpacity.jpg

Share this post


Link to post
Share on other sites

Would it not work by switching in a texture with an alpha layer in place of the origonal?

Share this post


Link to post
Share on other sites

I've aleady tryed to replace it by a CA texture with setObjectTexture and setObjectMaterial but as i said, there is an array in each object settings, if this one is empty, you can't replace anything.

Edited by Zigomarvin

Share this post


Link to post
Share on other sites

the model must have selections (areas) defined to be able to manipulate it via scripting.

if it doesnt have, there is no way

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
Sign in to follow this  

×