Flag Objects [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Flag Objects [Solved]

Post 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.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Flag Objects

Post 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.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: Flag Objects

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Flag Objects

Post 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.
User avatar
jangoisbaddest
Lieutenant General
Lieutenant General
Posts: 661
Joined: Mon Feb 27, 2006 12:10 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: All Along The Watchtower

Re: Flag Objects

Post 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!
Post Reply