Jump to content
Sign in to follow this  
OmniMax

Project aniflag

Recommended Posts

FROM: Lt. Omni-Max, 1st NTS Fireteam, Senior Combat Engineer, NTS.

READ: Project AniFlag HOW-TO and results

3rd class data, unclassified

------------------

Search Strings: ( Animation , Flag , Animated Flag )

---

Please note all testing was done using v1.42 Operation Flashpoint GOTY edition.

A member of NTS invented this, I just came up with the script.

We had tried using an animated .GIF file on a flagpole, this would not work so we came up with a way to jimmy rig it.

We originally took all the frames from the .gif file, recorded the seconds between them and made each frame a .jpg file (since OPF will allow flags of .jpg format, 256x256)

We used it by displaying a different "flag" for each frame to make a pseduo animated flag.

Also, we encountered a bug, apparently v1.42 doesn't like subdirectories, so we put them right in our mission's root.

assuming we have a flagpole named ntspole ...

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

#init

ntspole setflagtexture "N.jpg"

~.30

ntspole setflagtexture "T.jpg"

~.30

ntspole setflagtexture "S.jpg"

~.30

ntspole setflagtexture "rob.jpg"

~1.00

ntspole setflagtexture "50p.jpg"

~1.00

ntspole setflagtexture "amy.jpg"

~1.00

ntspole setflagtexture "smty.jpg"

~1.00

goto "init"

This sucessfully changed between each pseduo-frame (.jpg file) and produced an animated "flag" to display the letters of our team and the leading members.

The ~ command, for those who do not know, are timers, measured in seconds, we just took the time in frames from our .gif file and converted them over.

This is also useful if you want to display a message or random flags in random order.

This can also work for CTF modes but has not been implemented yet.

Big thanks to Random "50 Pesos" Hero for this little 'mod.

Edit: When running the script as an action, do not run it twice or two instances of the script will run (not sure if this is a v1.42 bug or what) it is recommended that you just put it in an init line or build a toggle in the script. Consult the Mission Editing FAQ for info on building a "switch" in your script.

---

Any questions, comments, please post comments to this post.

Share this post


Link to post
Share on other sites

One thing I just discovered, don't do the action more then once, it'll run mutliple instances of the script at once making the flagpoll look screwed up (not sure if this is a 1.42 problem or what.

I'll code a fix in the morning.

biggrin_o.gif

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  

×