Jump to content

sbondo1234

Member
  • Content Count

    56
  • Joined

  • Last visited

  • Medals

Posts posted by sbondo1234


  1. Just now, GEORGE FLOROS GR said:

    Sorry for the error above !

     

    
    if (isServer) then {
    {	
    	if (
    	((alive _x))
    	&& ((side _x) == west)
    	) then {
    	[_x,[0,"images\red.paa"]] remoteExec ["setObjectTexture",0,true];
    	};
    }forEach allUnits;
    };

     

     

    Just now, HazJ said:
    
    	[_x,[0,"images\red.paa"]] remoteExec ["setObjectTexture",0,true];

    Why? Use:

    https://community.bistudio.com/wiki/setObjectTextureGlobal

    No need for remoteExec now.

    Thanks for your guy's responses.

    I have a script which makes sure that the player is wearing what they are supposed to, so whenever it runs it changes the texture back to default. Is there any way around this? 


  2. 7 hours ago, MKD3-FHI said:

    This code is client side so using this (setObjectTextureGlobal) will cause the texture to be set globally, this isn't that useful for init.sqf which executes globally anyway, but doesn't hurt anyone.

    As for your problem, my thoughts are that a good way to find your answer is in your question:

    Code works, however not in init.sqf.

    This means it is probably an initialisation order problem. Meaning this code is running before your units exist.

    Try this to test that.
     

    
    sleep 10; 
     
    { 
      
    	_x setObjectTextureGlobal [0, "images\red.paa"]; 
     
    } forEach (allUnits select {side _x == WEST});



     

    Hey, thanks for this! It kind of works.

     

    Is it possible you know how I would make it exec this every x seconds?

     

    I'm also having trouble with people not seeing others have the texture on them but they can see themselves with it.


  3. 4 hours ago, kennyleif said:

    Not the trailer yet, but it is under way. 

    But here is a behind the scenes video where we share some information about the show 

     

    Hope you share it with your friends. 

     

    Can't wait for ep 1!


  4. I have a mission file I have been working on and I wanted to add custom textures to the clothing that you spawn in with. I have tried many things and I just can't find something that works. I have tried putting code in the init.sqf and I have also tried putting a line of code into each spawnable character in the mission file. Nothing seems to give the characters the texture I have put in an images folder.

     

    I have tried putting this into the init.sqf:

    {
      if ((side _x) == West) then {
         _x setObjectTexture [0, "images\red.paa"];
      };
    } forEach allUnits;

    Although when I spawn in it doesn't seem to work. The command works when I exec it in the debug console, so I'm not sure why that happens. The texture is blue when I exec it with the debug console, I'm not sure if that helps since my texture is red but it happens.

    • Like 1
×