Page 1 of 1
Need help with new game mode: Headquarters
Posted: Tue Aug 30, 2011 12:35 pm
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?
Re: Need help with new game mode: Headquarters
Posted: Tue Aug 30, 2011 12:54 pm
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.
Re: Need help with new game mode: Headquarters
Posted: Tue Aug 30, 2011 1:09 pm
by yuke5
^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!

Re: Need help with new game mode: Headquarters
Posted: Tue Aug 30, 2011 2:38 pm
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.
Re: Need help with new game mode: Headquarters
Posted: Tue Aug 30, 2011 3:04 pm
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.