Reinforcements and unit count. [Solved]

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
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Reinforcements and unit count. [Solved]

Post 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?
RogueKnight
Space Ranger
Posts: 2512
Joined: Sat Nov 22, 2008 1:50 pm
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: Washington, US

Re: Reinforcements and unit count.

Post 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.
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Re: Reinforcements and unit count.

Post 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?
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Reinforcements and unit count.

Post by Aman/Pinguin »

Code: Select all

RepFailed = OnCharacterDeath(
      function (character, killer)
        if GetCharacterTeam(character) == REP and IsCharacterHuman(character) then
            SetReinforcementCount (REP, 0)
         end
      end
   )
Last edited by Aman/Pinguin on Sat Jul 10, 2010 5:08 pm, edited 1 time in total.
fasty
1st Lieutenant
1st Lieutenant
Posts: 438
Joined: Thu Apr 15, 2010 4:17 am
Projects :: Server modding
Games I'm Playing :: SWBF2
Contact:

Re: Reinforcements and unit count.

Post by fasty »

:bowdown: Thank you so much it works.
Post Reply