hi there i am making conversion armor idea , so i need enemy team soldier class dont spawn ingame and not appear in unit selection screen, i tried watching geonosis campaign lua but icant find the function :S please help
for example:
if humanplayer use team 2 (cis) then
if humanplayer get 99999999999 points then
unlock class (soldier or cis_inf_rifleman)
Let me get this straight. You want the player to be forced onto a team....I think there is a function/line for that, somewhere at the start of all the campaign maps, which forces the player onto a certain team...
It might be better, however to just set the unit count for the unit you don't want to 0, or if you don't want a whole side, set the side unit count to 0........Also, i think there is a command used at the start of the stock geo campaign which doesn't allow the other team to spawn....
for example is geonosis campaign you cant use rep_inf_ep2_rocketeer until you complete previous mission so i want make the same , but using IF and THEN so put if player human team 2 (cis) then need gain 99999 points for unlock rep_inf_ep3_rocketeer or if gain 99999 points then unlock soldier class
Deviss wrote:for example is geonosis campaign you cant use rep_inf_ep2_rocketeer until you complete previous mission so i want make the same , but using IF and THEN so put if player human team 2 (cis) then need gain 99999 points for unlock rep_inf_ep3_rocketeer or if gain 99999 points then unlock soldier class
So, let me get this straight.
You want, if the humanplayer is on the CIS team, to need to gain 99999 points to unlock a certain unit?
Deviss wrote:for example is geonosis campaign you cant use rep_inf_ep2_rocketeer until you complete previous mission so i want make the same , but using IF and THEN so put if player human team 2 (cis) then need gain 99999 points for unlock rep_inf_ep3_rocketeer or if gain 99999 points then unlock soldier class
So, let me get this straight.
You want, if the humanplayer is on the CIS team, to need to gain 99999 points to unlock a certain unit?
I don't know how check to see what team the player is on, but the scripts "AddUnitClass"(see the geonosis script) and the "SetProperty" (points to unlock) can be used to get the other to things you want to happen happen.
I can probably arrange it into a lua code if someone could tell me how to do the first part.
StarkillerMarek wrote:I don't know how check to see what team the player is on, but the scripts "AddUnitClass"(see the geonosis script) and the "SetProperty" (points to unlock) can be used to get the other to things you want to happen happen.
I can probably arrange it into a lua code if someone could tell me how to do the first part.
AddUnit = OnCharacterDeath(
function(killer)
if IsCharacterHuman(killer) then
if GetCharacterTeam(killer) == 2 then
if GetTeamPoints(2) > 99999 then
AddUnitClass(2, "cis_inf_rifleman", 0)
end
end
end
end
)
end
2 is because cis team is 2 and using this anyway cis_inf_rifleman appear in unit screen selection :S
You know how to add a player to a team, right? Well in the spot where you define the unit count and name, remove the unit you don't want, say for instance the rocketeer. Then when you want them to be useable on the map, use the AddUnitClass command.
This is basicly what Starkiller was talking about...
lucasfart wrote:You know how to add a player to a team, right? Well in the spot where you define the unit count and name, remove the unit you don't want, say for instance the rocketeer. Then when you want them to be useable on the map, use the AddUnitClass command.
This is basicly what Starkiller was talking about...
there is a little problem... i need have that unit as first so i cant remove it from setupteams section