Page 1 of 1

Flag Objects [Solved]

Posted: Wed Mar 24, 2010 1:55 am
by jangoisbaddest
I'm trying to create a custom flag object. Trouble is that I can't seem to get it to work. I've tried several variations on the ODF as well as putting it in the world1's odf folder AND the side's odf folder (and of course the respective msh files in their proper places). I've also tried placing it as an object in ZE and having it a dropable item from dead units. In all cases, the game either couldn't build the flag object (when placed in ze) or couldn't find the entity (when done any other way). To be clear, I triple-checked the name of the odf and the source that calls it (LUA/Unit's ODF). I don't get it. Is there some special addition to the LUA I need to make in order for the game to recognize a flag object? Here's the ODF for my flag:

[GameObjectClass]
ClassLabel = "flag"
GeometryName = "all_weap_inf_sniperrifle.msh"

[Properties]
ClothODF = ""
ClothODF = ""
Lighting = "Dynamic"

IconTexture = ""
MapTexture = ""
MapScale = ""

GeometryName = "all_weap_inf_sniperrifle"
CarriedGeometryName = "all_weap_inf_sniperrifle"
CarriedOffset = "0.0 0.0 0.0"
CarriedColorize = 1
DroppedColorize = 1

PickupSound = "com_weap_inf_reload_med"
DropSound = ""
AmbientSound = ""

LifeSpan = 15.0

LightODF = "flaglight"

[InstanceProperties]

Let me know if I should post anything else. I suppose I could work around this, but I'd like to be less n00bish about Flag objects. There really isn't any documentation on them either here or in the modtools documentation.

Re: Flag Objects

Posted: Wed Mar 24, 2010 5:40 am
by MercuryNoodles
You have a memorypool setup for the flag, correct? There are also a few other special lines used in the CTF modes, but I'm not sure whether those are automatically setup in the luas generated by VM. Either way, it's all in Battlefront II Mission LUA Guide.doc, if you skip past the conquest mode part of it. Not to treat you like a newbie, or anything, but it seems like you've overlooked something simple.

Re: Flag Objects

Posted: Wed Mar 24, 2010 8:41 am
by Eggman
I'm pretty sure you need to reference it in your map's .req file. It's been a while since I've done anything with adding flag objects, but take a look in the .req file of a map that uses flag objects in campaign missions (Felucia, Yavin IV, a few others) and see if you can find a reference to a flag object. If so, then add a similar line to your map's .req file.

Re: Flag Objects

Posted: Wed Mar 24, 2010 4:04 pm
by Fiodis
It worked fine for me without any .req reference.

EDIT - What am I saying? I loaded it through the ingame.lvl, and so had it referenced in ingame.req. You could try that if referencing it somewhere else doesn't work.

Re: Flag Objects

Posted: Wed Mar 24, 2010 4:25 pm
by jangoisbaddest
Eggman wrote:I'm pretty sure you need to reference it in your map's .req file. It's been a while since I've done anything with adding flag objects, but take a look in the .req file of a map that uses flag objects in campaign missions (Felucia, Yavin IV, a few others) and see if you can find a reference to a flag object. If so, then add a similar line to your map's .req file.
That did the trick. Thanks a lot!