[SOLVED] 1 unit

Started by Snake, April 19, 2011, 08:27:52 AM

Previous topic - Next topic
April 19, 2011, 08:27:52 AM Last Edit: April 20, 2011, 12:49:45 PM by SnΛke
I was wondering how to give a map only one unit. Do you just take all units off the .lua except 1?
=AaTc= Forever

SALLY....

-Retired Modder

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.

Nice, thanks!
=AaTc= Forever

SALLY....

-Retired Modder

April 20, 2011, 05:06:41 PM #3 Last Edit: November 12, 2011, 04:54:49 PM by Phobos Developer
removed?

Well I mean being able to spawn as only one unit.
=AaTc= Forever

SALLY....

-Retired Modder

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