Page 1 of 1

Reinforcements and unit count. [Solved]

Posted: Fri Jul 09, 2010 10:54 pm
by fasty
Okay, so I want REP to have no AI units spawn. I also want them to have no reinforcements. Just a "-" in the reinforcement count.
This is what I have on my .lua:
Hidden/Spoiler:
SetupTeams{
rep = {
team = REP,
units = 1,
reinforcements = 1,
soldier = { "jed_sith_01",0, 1},
As a result, no AI spawn, but the reinforcement count is "1" (What a surprise). If I don't hurry and spawn quick the count will go down to 0 and I'm defeated :oops: . So what do I put for my reinforcements?

Re: Reinforcements and unit count.

Posted: Fri Jul 09, 2010 10:59 pm
by RogueKnight
Change;

Code: Select all

reinforcements = 1,
to

Code: Select all

reinforcements = -1,
To give your side infinite reinforcements, off the top of my head, if I'm wrong you can check stock conquest scripts to see how they did it.

Re: Reinforcements and unit count.

Posted: Fri Jul 09, 2010 11:04 pm
by fasty
Thank you, it worked. Since it was an easy question I'll ask another one similar. I still want to lose when I die. I just don't want to have the reinforcement drain to defeat me before I spawn.
Is this going to take some scripting? Would I be better off just having it be 1 and adding more cp's?

Re: Reinforcements and unit count.

Posted: Sat Jul 10, 2010 12:24 am
by Aman/Pinguin

Code: Select all

RepFailed = OnCharacterDeath(
      function (character, killer)
        if GetCharacterTeam(character) == REP and IsCharacterHuman(character) then
            SetReinforcementCount (REP, 0)
         end
      end
   )

Re: Reinforcements and unit count.

Posted: Sat Jul 10, 2010 12:41 am
by fasty
:bowdown: Thank you so much it works.