OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: Landdon on 10 May 2010, 09:41:15

Title: Creating a Custom Flagpole
Post by: Landdon on 10 May 2010, 09:41:15

To all,

In Armed Assault (Arma) you were able to hang a custom flag on a flagpole.  Is there a blank Flagpole in Arma 2 and I missed it?  Below is a script that worked well in Armed Assault, but it is not working in Arma 2, it wants a ";" someplace and I don't understand where it needs to go.  Or does anyone have a better solution they care to share with me?  Thanks!


Code: [Select]
this setFlagTexture ""flag\usarmy.jpg""; this setPos [getPos this select 0,getPos this select 1, -2.5]

V/R
Landdon
Title: Re: Creating a Custom Flagpole
Post by: h- on 10 May 2010, 10:10:32
Odd, there really doesn't seem to be an empty flagpole available..

Anyway, all the flags available in the editor are done using setFlagTexture (they have an init eventhandler doing it) so it should work on any of the available faction flags.

Not knowing where you use that code you posted but if you use it in a script or trigger or so it should be
Code: [Select]
this setFlagTexture "flag\usarmy.jpg"; this setPos [getPos this select 0,getPos this select 1, -2.5]I don't know how that would have worked in A1 because double paranthesis (or what ever those are called) should not work in situation like that (unless the line is from a config event or something)..

Other thing is that depending on where exactly the flag texture is as in if it's an addon you may need to use
Code: [Select]
this setFlagTexture "\flag\usarmy.jpg"; this setPos [getPos this select 0,getPos this select 1, -2.5]
And one more possibility for this not working might be that the game doesn't allow using jpg images in this kind of situation anymore and you should use .paa instead (convert the jpg to paa using BIS TexView in the Arma2 tool suite, that is if it supports jpg)..

:dunno:
Title: Re: Creating a Custom Flagpole
Post by: Ironman on 10 May 2010, 11:33:47
lmao I was about to post this exact same question yesterday but all you have to do is convert the Jpeg to .paa.... make sure it has the right DIMENSIONS!

this setFlagTexture "Britishflag.paa"

that worked beautiful to me.... if you have a folder named "flag" in your mission folder then you would have to access it how you already did with the above posts...
Title: Re: Creating a Custom Flagpole
Post by: Landdon on 11 May 2010, 03:32:51
Thanks, I got it to work at first for what ever reason it would read the texture inside the folder regardless if it was jpg or paa.  But finally it accepted it and the jpg or paa version of the texture will work and can be seen.  The paa file is black at a distance.  I'm going to have to get more experienced using that type of file.  Thanks all for your help!
Title: Re: Creating a Custom Flagpole
Post by: F2kSel on 15 May 2010, 16:04:50
Quote
Odd, there really doesn't seem to be an empty flagpole available..


If you need an empty flag poll just use

 
Code: [Select]
this setFlagTexture "";