Home   Help Search Login Register  

Author Topic: changing flag textures and getting them to stay changed  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

Offline filth

  • Members
  • *
  • Who's the bad man?
i have a bit of a problem with a mission where i give the player the ability to change flags on a flagpole using the add action command.

in my init.sqs i have the following line:

flag1 setflagtexture "\Flags\Mozambique.jpg"

in the init field of the flag pole, i have:

this addAction ["Raise the US flag", "flag1.sqs"];

which runs the script:

~0.5

firstflag = true;

"1" objstatus "done";

"flag1" SetMarkercolor "ColorBlue";

flag1 removeAction 0;

hint "US flag flying at Well 1.";

flag1 setflagtexture "\Flags\usa.jpg";

; exit the script
exit

which works perfectly in the editor, but when i play it from the missions menu, the flag turns to the stars and stripes for about 2 seconds then resets itself to the previous flag texture.

can anyone tell me how to get it to stay as the us flag?

thx

filth.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: changing flag textures and getting them to stay changed
« Reply #1 on: 25 Feb 2007, 11:10:10 »
Well, it should work, but if for some misterious reason it doesnt try:

Code: [Select]
~0.5
firstflag = true;
"1" objstatus "done";
"flag1" SetMarkercolor "ColorBlue";
hint "US flag flying at Well 1.";
_pos = getPos flag1
deleteVehicle flag1

_flag = "FlagCarrier" createVehicle _pos
_flag setflagtexture "\Flags\usa.jpg"
exit

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: changing flag textures and getting them to stay changed
« Reply #2 on: 25 Feb 2007, 15:35:04 »
i'll give it a try.

thx mandoble.