Jump to content
Sign in to follow this  
Schwab

Setflagtexture

Recommended Posts

Easy description, no solution yet:

I have flagpoles all over sahrani, i added an action to them which calls a script.

The script says

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_caller = _this select 1;

_callerside = side _caller;

...

switch (_callerside) do

{

case west:

{

(_flag) setFlagTexture

"\ca\misc\data\usa_vlajka.paa";

};

case east:

{

(_flag) setFlagTexture

"\ca\misc\data\sever_vlajka.paa";

};

};

The flag turns correct to west or eastflag depending on who is calling the script. But wtf ? 5-6 seconds later the flag turns into this blue-white striped thingy again ?

Any idea why ? It's the only place in whole mission where setflagtexture is used.

Maybe the effect is not global ? Do i have to publish the flag at the end ?

Share this post


Link to post
Share on other sites

Nobody an idea ? Some1 who changes Flags successfully with an Actionmenu in his mission maybe ?

Local its working correct and it does not switch back. Only when on dedicated it first gets new texture, and then switches back after some seconds.

Even if i publish the flagpole after switching it does switch back....

What can this be ?

Share this post


Link to post
Share on other sites

That's a global command. Only the server should execute it.

As to why it changes back.. I dunno!

Doolittle

Share this post


Link to post
Share on other sites

Nope. The flags are set in the editor, so in the mission.sqm.

The addaction is added there aswell.

Share this post


Link to post
Share on other sites

a script running on the server calling the setflagtexture command will set the flags globally to all clients ... as global markers do.

so JIP players only need to be informed by setflagtexture and setmarkercolor as onplayerconnect event was fired instead of using publicvariables.

UGAH! xmas_o.gif

Share this post


Link to post
Share on other sites

Zaphod, are you sure new people need to be informed about setFlagTexture?! I understand they need new marker info... but I don't think setFlagTexture needs to be sent.

EDIT: I just tested & it doesn't need to be resent... setFlagTexture that is.

Doolittle

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  

×