Command Posts vs. Reinforcements

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
Aussie_Irishman

Command Posts vs. Reinforcements

Post by Aussie_Irishman »

i was wondering if it's possible to setup a concept where if an enemy captures ONE particular command post, their reinforcement could rise by a set amount....but once again, i'll repeat, just one command post on the map like that, and it only happens when one team captures it.....

AJay
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Command Posts vs. Reinforcements

Post by [RDH]Zerted »

Yes.
Rekubot
Jedi
Jedi
Posts: 1080
Joined: Wed Apr 05, 2006 12:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: Shadow Complex
xbox live or psn: Rekubot
Location: UK

RE: Command Posts vs. Reinforcements

Post by Rekubot »

LoL Zerted, somehow I get the feeling that Aussie was wondering exactly how to do such a thing ;). Are you willing to help him out or was the blunt 'yes' a subtle meaning for 'it's in the docs'? :P
Qdin
Old School Staff
Posts: 2059
Joined: Wed Feb 23, 2005 9:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Command Posts vs. Reinforcements

Post by Qdin »

It's in the .lua files for some of the shipped maps :P In some of the missions it adds X amount of reinforcements when an objective is done, or a CP is taken.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

RE: Command Posts vs. Reinforcements

Post by [RDH]Zerted »

The blunt yes was just answering the question he asked. I don't know if Aussie_Irishman wants to learn how to do it himself, but doesn't want to spend the time trying then discover it isn't possible. Now that he knows its possible, he might want to try to figure it out on his own. If not, he could just look at the quote contained in the post. (By the way, read the scripting system documentation. There is a whole section on commands posts.)
OnFinishCaptureName(
function(post, holding)
if [ENEMY TEAM NUMBER] ~= GetCommandPostTeam(post) then return end
AddReinforcements( [THE TEAM NUMBER TO ADD REINFORCEMENTS TO], [THE AMOUNT OF REINFORCEMENTS TO ADD TO THE TEAM] )
end, "[YOUR CP NAME]"
)
I haven't tested this ingame, but I think I spelled everything correctly. Don't just paste this code into your map. Read it over and if you don't/can't understand it, say so.

(Oh and admins, don't just lock this thread becasue I posted one possible solution)
Aussie_Irishman

RE: Command Posts vs. Reinforcements

Post by Aussie_Irishman »

thank you very much Zerted, and well looking back on it i never really asked for anything further than a "yes or no", but the solution is good nonetheless...i needed to know if it was possible for the design on my new map in a series.

AJay
Qdin
Old School Staff
Posts: 2059
Joined: Wed Feb 23, 2005 9:54 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Command Posts vs. Reinforcements

Post by Qdin »

Interesting, nonetheless :P We'll keep it up for more solutions with adding reinforcemnts :)
Post Reply