Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: spirit1flyer on September 25, 2005, 10:23:24 AM

Title: Victory Condition?
Post by: spirit1flyer on September 25, 2005, 10:23:24 AM
what do I put to make the Victory Condition into a population goal? and not just a kill enemy goal?

CreateLastOneStandingVictoryCondition();

return 1; // return 1 if OK; 0 on failure

spirit
Title: Victory Condition?
Post by: BlackBox on September 25, 2005, 11:55:45 AM
What'd you'd do is remove the CreateLastOneStandingVictoryCondition(); line above.

Then code like this: (Example, 400 colonists for player 0; Just change the 400 and 0 in the first line if you want)
Code: [Select]
Trigger population = CreateResourceTrigger(1, 1, resColonists, 400, 0, cmpGreaterEqual, "NoResponseToTrigger");

CreateVictoryCondition(1, 0, population, "Have 400 Colonists.");

You can tweak the 400 and 0 in the first line as you want, to specify the amount and player ID (0 is usually the human in a colony game), and you can tweak the text in the 2nd line if you wish.

Hope it helps!
Title: Victory Condition?
Post by: spirit1flyer on September 25, 2005, 12:44:35 PM
yes thanks  B)  
That will let me do just what I want  :)


Spirit