Addons & Mods Depot => ArmA - Configs & Scripting => Topic started by: Praxtor on 20 Dec 2008, 17:24:21

Title: SetObjectTexture only local?
Post by: Praxtor on 20 Dec 2008, 17:24:21

I have one addon unit that in player actions i have one action that execute one script that show one hab with hiddentextures and setobjecttextures but the problem is the other players are not able to see my hab i think is because setobjecttexture is runing in local and is not a global command, have some guy one idea about how i can make for all the players can see my hab with the setobjecttexture in one player actins??

Title: Re: SetObjectTexture only local?
Post by: Gnat on 21 Dec 2008, 00:39:43
I guess the hiddentextures and setobjecttextures are being changed by a script, but that script is not MP compatible. The script would need to run on all client machines. The command "setobjecttexture" is certainly not MP compatible.

Your solution lays with MP Scripting.
I would move this Thread to MP scripting except I can suggest 1 other way that is addon config related.
If you use the ANIMATE command with the "hide" source animation you could also do this, depending on your unit.
What it would require;
- Copy the WHOLE skin section again in all LODs and apply the second texture to the extra section
- Name that section
- Repeat for however many skins/textures you have
- In your CFGModel file definition, definte each section with a "hide" animation
- use the EventHandler INIT to hide All Textures/skin sections except 1
- Script or use "UserAction" to hide/swap Textures/skin sections except the 1 you want visible

- You need a lot of extra faces in your model, and it can be difficult to edit
- The actual textures are pre-defined at time of O2 editing, can't be script changed later.

- No need for special MP scripts. The "animate" command/the change is broadcast automaticly to all clients.