Jump to content
Sign in to follow this  
Nephris1

Raising a flag

Recommended Posts

Hi folks,

can u help me for a script to get a flag down or a flag up when a player is in a certain distance.

I got a script from OFP, but it doesnt working anymore...supris, suprise.

#flagdown
_posx = (getpos _flag1 select 0)
_posy = (getpos _flag1 select 1)
_posz = (getpos _flag1 select 2) - 0.02
_flag1b setpos [_posx,_posy,_posz]
~0.001
?((getpos _flag1 select 2) <= -7):_flag1 setflagtexture "Ca\Data\flag_usa_co.paa";
goto "flagdown"

Share this post


Link to post
Share on other sites

First off the flags are as addons now in arma 2, try to use Faction_US instead of flag_usa_co.paa, and the script needs some work...following part needs to be fixed but i dont know how

?((getpos _flag1 select 2) <= -7):_flag1 setmarkertype "Ca\Data\flag_usa_co.paa";
goto "flagdown"

Maybe something like:

?((getpos _flag1 select 2) <= -7):_flag1 (call for addon here maybe?) "Faction_US";

Hope this helped something so you could figure it out from here xD

Share this post


Link to post
Share on other sites

Now that i though of it more, in ofp the flags picture was moved... im not sure if you can actually move the flag in the addon, unless you move the whole flagpole underground or something =/

Share this post


Link to post
Share on other sites

That code works fine for lowering the pole. You just don't actually tell it anywhere in that example what _flag1 is...

Try adding _flag1 = myFlagPolesName

and see if it works better.

Also, the flag texture name is fine, here's the current flags for ArmA 2:

flag_usmc_co.paa - US Marie Corps Flag

flag_usa_co.paa - United States of America Flag

flag_rus_co.paa - Russian Armed Forces Flag

flag_napa_co.paa - National Party Flag

flag_chernarus_co.paa - Chernarussian Defence Forces Flag

flag_chdkz_co.paa - Chernarussian Movement Of The Red Star Flag

Edited by kylania

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  

×