Need help with new game mode: Headquarters

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
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Need help with new game mode: Headquarters

Post by Locutus »

Hi!
Currently I'm trying to add a new game mode called "headquarters".
Unfortunately I do not have any lua skills so it would be cool if you help me a little bit ;)

I have placed several destructible command posts on my map which (should) serve as outposts. Thats working.
Now I want to have some kind of headquarters which you have to destroy to win. The tricky thing is that you can't destroy the headquarters until all of the hostile outposts are destroyed.
Any idea how to realize that?
Nobandwidth25
Private
Posts: 32
Joined: Mon Jul 04, 2011 12:22 am
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront II
xbox live or psn: No gamertag set

Re: Need help with new game mode: Headquarters

Post by Nobandwidth25 »

You could just set-up objectives as destroy x, then destroy y, then destroy z and so on, making the HQ the last one. Then you could set the last one as a victory condition, I suppose. I suck at LUAs, so how you'd code that it would be beyond me.
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Need help with new game mode: Headquarters

Post by yuke5 »

Hidden/Spoiler:
--set max health on droids so player can't repair them before the objective
SetProperty("ammo_pad", "MaxHealth", 9999999999)
SetProperty("health_pad", "MaxHealth", 9999999999)
SetProperty("ammo_pad", "CurHealth", 0)
SetProperty("health_pad", "CurHealth", 0)
^Something similar to this could make your hq invincible, and by changing the "CurHealth" after a certain objective has been completed, such as destroying the outposts. There was actually a fairly similar game mode to this in this really good map: http://starwarsbattlefront.filefront.co ... mple;74612

You might want to check out a lot of the campaign LUA's. That'd probably be your best bet, You can get to the campaign LUA's by going to assets, then scripts, and the all the worlds three letter folders are shown. From there select maps which have the following format XXXc_c or XXXc_g. I hope this helps! :thumbs:
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Need help with new game mode: Headquarters

Post by THEWULFMAN »

...Or you could ask Mav for his Sand Castle lua, he offered to release it if someone wanted his Beach Troopers Lua scripts.
Maveritchell wrote:P.S.: All the modes in this mod I designed to be extensible; that is to say that they're not written as map specific, they should be able to be plugged in to any existing map (like the Dark Times II modes). If you're a designer and you have a hankering to use one of these modes, let me know.
Sand Castle is almost just like the mode you suggested. The HQ(Sand Castle) wouldn't be able to be destroyed until all the enemy CP's are captured.

I personally didn't ask because I do believe Mav generally wants us to figure these things out on your own, and I respect that. I'm not that it would be wrong to ask him for the script, just saying why I personally did not ask.
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: Need help with new game mode: Headquarters

Post by CressAlbane »

Maybe each time an outpost is destroyed, it activates a counter - once that counter reaches a certain number, the HQ is vulnerable. Use yuke5's suggested method for the actual change.
Post Reply