SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Snake on April 19, 2011, 08:27:52 AM

Title: [SOLVED] 1 unit
Post by: Snake on April 19, 2011, 08:27:52 AM
I was wondering how to give a map only one unit. Do you just take all units off the .lua except 1?
Title: Re: [HELP] 1 unit
Post by: SleepKiller on April 19, 2011, 10:14:39 PM
Find these lines in your LUA

AddUnitClass(REP, "rep_inf_clone_trooper",11) -- Change it's value to 1
AddUnitClass(REP, "rep_inf_arc_trooper",3) -- Remove this line
AddUnitClass(REP, "rep_inf_clone_pilot",4) -- Remove this line
AddUnitClass(REP, "rep_inf_clone_sharpshooter",4) -- Remove this line
AddUnitClass(REP, "rep_inf_jet_trooper",3) -- Remove this line
Then find this line in the lua(Presuming the republic is the attacker)
SetUnitCount(ATT, 25) -- Change to 1
Or if I misunderstood you do this with the same lines
AddUnitClass(REP, "rep_inf_clone_trooper",11) -- Change it's value to 25
AddUnitClass(REP, "rep_inf_arc_trooper",3) -- Remove this line
AddUnitClass(REP, "rep_inf_clone_pilot",4) -- Remove this line
AddUnitClass(REP, "rep_inf_clone_sharpshooter",4) -- Remove this line
AddUnitClass(REP, "rep_inf_jet_trooper",3) -- Remove this line

This is just what I think would work and it should.
Title: Re: [HELP] 1 unit
Post by: Snake on April 20, 2011, 09:01:42 AM
Nice, thanks!
Title: Re: [SOLVED] 1 unit
Post by: Phobos on April 20, 2011, 05:06:41 PM
removed?
Title: Re: [SOLVED] 1 unit
Post by: Snake on April 20, 2011, 05:39:23 PM
Well I mean being able to spawn as only one unit.
Title: Re: [SOLVED] 1 unit
Post by: Phobos on April 21, 2011, 05:20:47 PM
Quote from: SnΛke on April 20, 2011, 05:39:23 PM
Well I mean being able to spawn as only one unit.

This is covered in my mission.lvl tutorial, but simply put there's 2 ways

Method 1
Quote
            --AddUnitClass(ALL, "all_inf_soldierurban",0)
            --AddUnitClass(ALL, "imp_inf_shock_trooper",0)
            --AddUnitClass(ALL, "imp_inf_pilottie",1)
            --AddUnitClass(ALL, "all_inf_smuggler",0)
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
In this example only jets spawn

Method 2
Quote
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
            AddUnitClass(ALL, "imp_inf_dark_trooper",0)
In this example only jets spawn
EhPortal 1.34 © 2025, WebDev