Page 1 of 1

Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 2:42 am
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

RE: Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 1:06 pm
by [RDH]Zerted
Yes.

RE: Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 2:15 pm
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

RE: Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 4:45 pm
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.

RE: Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 6:12 pm
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)

RE: Command Posts vs. Reinforcements

Posted: Sat Sep 16, 2006 8:14 pm
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

RE: Command Posts vs. Reinforcements

Posted: Sun Sep 17, 2006 8:23 am
by Qdin
Interesting, nonetheless :P We'll keep it up for more solutions with adding reinforcemnts :)