×

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
  • /
  • Lua Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 106 / 388 › »
Lua Kodları Tartışma & Yardımlaşma Başlığı
Leo
« Citoyen »
1398508020000
    • Leo#6000
    • Profil
    • Derniers messages
#2101
  0
http://imgur.com/bmDmOdg.png
Dinorai
« Citoyen »
1398515820000
    • Dinorai#0000
    • Profil
    • Derniers messages
#2102
  0
[url=]Yeni harita açıyorum(lua ile) kabile evi mapı açılıyo yardım edin :([/url]

edit:gerek yok buldum :tfm.exec.newGame(maps[math.random(#maps)])
Barsemsbot
« Citoyen »
1398516840000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2103
  0
won={}
time=0

function eventPlayerWon(name)
table.insert(won,name)
ui.addTextArea(1,table.concat(won, ","))
end

function eventNewGame()
table.remove(won)
end

function eventLoop()
time=time+0.5
if time==10 then
ui.removeTextArea(1)
time=0
end
end

Kazanan kişiyi text area ile yazar. 10 saniye sonra yok olur.
Fatihmilano
« Citoyen »
1398517500000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#2104
  0
Barsemsbot a dit :
won={}
time=0

function eventPlayerWon(name)
table.insert(won,name)
ui.addTextArea(1,table.concat(won, ","))
end

function eventNewGame()
table.remove(won)
end

function eventLoop()
time=time+0.5
if time==10 then
ui.removeTextArea(1)
time=0
end
end

Kazanan kişiyi text area ile yazar. 10 saniye sonra yok olur.

10 sanyie duracağından emin misin?
Dinorai
« Citoyen »
1398517620000
    • Dinorai#0000
    • Profil
    • Derniers messages
#2105
  0
Aşşağıdaki koddaki sorunu düzeltirmisiniz

aşşağıdaki kod a dit :
red={}
blue={}
function makeTeams()
local playerList={}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(playerList,name)
end
for i=1,#playerList,1 do
local index=math.random(#playerList)
local name=playerList[index]
if i%2==0 then
table.insert(red,name)
tfm.exec.movePlayer(name, 315, 335)
tfm.exec.setNameColor(name, 0xFE0000)
else
table.insert(blue,name)
tfm.exec.movePlayer(name, 1250, 335)
tfm.exec.setNameColor(name, 0x0010FF)
end
table.remove(playerList,index)
end
end

^
Fatihmilano
« Citoyen »
1398520140000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#2106
  0
Dinorai a dit :
Aşşağıdaki koddaki sorunu düzeltirmisiniz


^

Kodda herhangi bir sorun yok...
Dinorai
« Citoyen »
1398520560000
    • Dinorai#0000
    • Profil
    • Derniers messages
#2107
  0
Fatihmilano a dit :
Kodda herhangi bir sorun yok...

tamam hallettim başka kodda hata varmış *-*
Yumioo
« Citoyen »
1398521700000
    • Yumioo#0000
    • Profil
    • Derniers messages
    • Tribu
#2108
  0
Barsemsbot a dit :
won={}
time=0

function eventPlayerWon(name)
table.insert(won,name)
ui.addTextArea(1,table.concat(won, ","))
end

function eventNewGame()
table.remove(won)
end

function eventLoop()
time=time+0.5
if time==10 then
ui.removeTextArea(1)
time=0
end
end

Kazanan kişiyi text area ile yazar. 10 saniye sonra yok olur.

10 salise :/
Barsemsbot
« Citoyen »
1398524280000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2109
  0
Saniye
Oyga
« Citoyen »
1398524280000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#2110
  0
Barsemsbot a dit :
Saniye

loop = 600ms
Oyga
« Citoyen »
1398524400000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#2111
  0
600+600=1200
Barsemsbot
« Citoyen »
1398524400000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2112
  0
time=time+0.5
Fatihmilano
« Citoyen »
1398524400000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#2113
  0
Salise demesinin sebebi yeni haritada onu kaldırman.
Barsemsbot
« Citoyen »
1398524760000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2114
  0
won={}
time=0

function eventPlayerWon(name)
table.insert(won,name)
ui.addTextArea(1,table.concat(won, ","))
time=0
end

function eventNewGame()
table.remove(won)
end

function eventLoop()
time=time+0.5
if time==10 then
ui.removeTextArea(1)
time=0
end
end

alın size 10 saniye.
Oyga
« Citoyen »
1398524760000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#2115
  0
Barsems senin 0.5 dediğin 500 artacak fakat 500 değil 600 oluyor o.
a dit :
t=os.time()

function eventLoop()
if os.time()-t >= 1000 then
t=os.time()
print("1")
end
end

Al bak 1 saniye.
Barsemsbot
« Citoyen »
1398524880000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2116
  0
Ediz a dit :
<N><b>eventLoop</b><BL>(<G>Tamsayı <V>SuAnkiSure<BL>, <G>Tamsayı <V>KalanSure<BL>)
<BL>• Sürekli tekrar çalışan bir döngüdür(Loop).
[url=]• Bu olay 500 milisaniyede bir aktif olur.[/url]

.
Oyga
« Citoyen »
1398525000000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#2117
  0
Transforlays a dit :
eventLoop aslında yaklaşık 600ms'de bir çağrılıyor

^
Barsemsbot
« Citoyen »
1398525180000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#2118
  0
Tigrounette a dit :
<N><b>eventLoop</b><BL>(<G>Int <V>currentTime<BL>, <G>Int <V>timeRemaining<BL>)
<BL>• This event occurs every 500 miliseconds.

.
Fatihmilano
« Citoyen »
1398525180000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#2119
  1
Barsemsbot a dit :
.

Lays Tig'den iyidir :p
Oyga
« Citoyen »
1398525180000
    • Oyga#0000
    • Profil
    • Derniers messages
    • Tribu
#2120
  0
Fatihmilano a dit :
Lays Tig'den iyidir :p

^ Lays pro. U.U

Hala inanmıyorsan harita süresini printe yazdır ve bak, -600 olarak azalıyor.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 106 / 388 › »
© Atelier801 2018

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

Version 1.27