Jump to content
Sign in to follow this  
EncounterQ

Help with setObjectTexture (and zone capture)

Recommended Posts

Hi.

I have been trying to make a flag change texture depending on which team controls the area that it is in. So far I have put this code in the initialisation of a Flag (small), and it works as expected, the flag changes colour to green.

this addEventHandler ["HandleDamage", {false}];
this setObjectTexture [0,'#(argb,8,8,3)color(0,1,0,1)'];

However, this flag is far smaller than what I wanted, but I found the Flag (checked), which is a much nicer size. However, setObjectTexture does not seem to work with this object, so I would like some help with how to achieve this.

Also, does anybody know the file paths of the nation/faction flags for arma 3 so I could reskin the checked flag with the correct flag texture if there is a method to do this that works?

Finally, could somebody show me how I would go about detecting which side is in control of an area? So far I only have a simple trigger that changes the small flag colour (not texture) when a unit enters the area. What I would like is if a similar number of units from each team were present in the nearby area, the flag would be neutral, and if there was a majority presence of one side the flag texture would change to that side. This would help me to create an area capture system for a basic TvT mission.

Thanks.

Share this post


Link to post
Share on other sites

I would really appreciate it if someone could at least help with my texturing issue.

I have tried this:

this setObjectTexture [1,'#(argb,8,8,3)color(0,1,0,1)'];
and
this setObjectTexture [2,'#(argb,8,8,3)color(0,1,0,1)'];    

yet still I see no change in the checked texture on the flag. Should I be using setObjectMaterial instead for this object? I don't see why this flag model will not be retextured when the Flag (small) model will.

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  

×