×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Function] eventRoundEnded(map, nround, fround)
[Function] eventRoundEnded(map, nround, fround)
Benbirkralm
« Citoyen »
1414428060000
    • Benbirkralm#0000
    • Profil
    • Derniers messages
    • Tribu
#1
  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 :
n=1
rn=3
function eventRoundEnded(m, n, f)

eventNewGame()

if f<=n or (n+1<f+1) then

n=1

tfm.exec.setUIMapName(m.. " | " ..n.."/"..f)

end
end



function eventNewGame()

n=n+1

m= tfm.get.room.xmlMapInfo.author.." - "..tfm.get.room.currentMap
end


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
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#2
  0
It isn't work.
Itchyboy
« Citoyen »
1414456080000
    • Itchyboy#0000
    • Profil
    • Derniers messages
    • Tribu
#3
  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
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Function] eventRoundEnded(map, nround, fround)
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27