[Function] eventRoundEnded(map, nround, fround) |
Benbirkralm « Citoyen » 1414428060000
| 0 | ||
Hey, guys. I was really bored. And I think I can write somethings. I wasn't looking Modukes or writing Scripts a long time, it may good to me, too Within this function, you can learn the current round of map and total rounds . a dit : How to Use it? n=1 nr=5 function eventRoundEnded(m, n, f) if n==f then -- if third round ends: tfm.exec.newGame("@333333") -- @333333 will load. end end |
Neonstrayzer « Citoyen » 1414430160000
| 0 | ||
It isn't work. |
Itchyboy « Citoyen » 1414456080000
| 0 | ||
I found the original script hard to understand and that it would be easier just code the stuff on your own time. There is also no way to make the function happen in your script, so here's mine: tfm.exec.newGame(tfm.get.room.currentMap) --Replace 180 with whatever time you want every map to be in seconds time=180 time2=false time3=0 players=0 dead=0 function eventRoundEnded(map) --Stuff end function eventNewPlayer(name) players=players+1 end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventPlayerDied(name) dead=dead+1 if dead==players then eventRoundEnded(tfm.get.room.currentMap) end end function eventPlayerLeft(name) players=players-1 end function eventPlayerWon(name) dead=dead+1 if dead==players then eventRoundEnded(tfm.get.room.currentMap) end end function eventNewGame() tfm.exec.setGameTime(time) time2=true dead=0 end function eventLoop() if time2 then time3=time3+1 local time3=time-time3/2 if time3==0 then eventRoundEnded(tfm.get.room.currentMap) end end end Dernière modification le 1414456140000 |