Page 1 of 1

Game End triggers? NEW Question!

Posted: 17 Mar 2011, 02:19
by bobthedinosaur
When will the end game triggers (lua wise) be redone and what will they look like?

Re: Game End triggers? NEW Question!

Posted: 17 Mar 2011, 21:30
by knorke
http://springrts.com/wiki/Lua_SyncedCtrl#Game_End

why in Game & Module Development Tutorials & Resources?

Re: Game End triggers? NEW Question!

Posted: 17 Mar 2011, 21:43
by bobthedinosaur
I believe this pertains to mods/ and tutorials for modding, even though it may be in lua.

How would you set up this:
will declare game over, a list of winning allyteams can be passed, if undecided ( like when dropped from the host ) it should be empty ( no winner ), in the case of a draw with multiple winners, all should be listed
Or has none of this been decided yet?

Re: Game End triggers? NEW Question!

Posted: 17 Mar 2011, 21:56
by knorke
but isnt this subforum the archive?

anyway, use like this:

Code: Select all

table.insert (winners, 0) --add team 0 to winners list
table.insert (winners, 2) --add team 2 to winners list
Spring.GameOver (winners) --now the game ends and team 0+2 have won
Or say you where you have a neutral flag in the middle of the map and players can capture it. And whoever controlls it after 5 minutes wins.
Then you could do:

Code: Select all

gadget:GameFrame (frame)
if (frame == 5*60*30) then
  winner = Spring.GetUnitTeam (unitID_of_Flag)
  Spring.GameOver (winner)
end
It says New in version 0.83.x so it is probally some months away.

Re: Game End triggers? NEW Question!

Posted: 18 Mar 2011, 00:00
by McLoud
Lack of any construction-able units would be a factor I think

Re: Game End triggers? NEW Question!

Posted: 30 Apr 2011, 10:44
by knorke
knorke wrote:http://springrts.com/wiki/Lua_SyncedCtrl#Game_End

why in Game & Module Development Tutorials & Resources?
why is this thread still in "Game & Module Development Tutorials & Resources"? Its not a tutorial & not a resource of any kind.

Re: Game End triggers? NEW Question!

Posted: 30 Apr 2011, 12:06
by Tobi
moved