×

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 Snippets
« ‹ 28 / 33 › »
Lua Snippets
Toyratz
« Citoyen »
1401964920000
    • Toyratz#0000
    • Profil
    • Derniers messages
    • Tribu
#541
  0
._. i dont know how to make an map with no skills...
Grinjr
« Citoyen »
1402068840000
    • Grinjr#0000
    • Profil
    • Derniers messages
    • Tribu
#542
  0
Leafileaf a dit :


You'll need addImage which is not available in tribe houses.

You'd need to be apart of the module team to use it.

Toyratz a dit :
._. i dont know how to make an map with no skills...

If you mean making a map that has no skills available for shamans then you cannot make a map with skills disabled as far as I know, but if you mean lua for disabling skills, try this

tfm.exec.newGame()
tfm.exec.disableAllShamanSkills(true)
Safwanrockz
« Censeur »
1402074720000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#543
  0
Grinjr a dit :


You'd need to be apart of the module team to use it.

Members of the Module team have the same powers as regular members in tribe houses, hence even Module members can't use addImage() there.
Toyratz
« Citoyen »
1402131960000
    • Toyratz#0000
    • Profil
    • Derniers messages
    • Tribu
#544
  0
Grinjr a dit :


You'd need to be apart of the module team to use it.
If you mean making a map that has no skills available for shamans then you cannot make a map with skills disabled as far as I know, but if you mean lua for disabling skills, try this

tfm.exec.newGame()
tfm.exec.disableAllShamanSkills(true)

Thanks

i will make an minigame by using http://pastebin.com
Toyratz
1402201680000
    • Toyratz#0000
    • Profil
    • Derniers messages
    • Tribu
#545
[Modéré par Yogiibear, raison : Double post, merged.]
Toyratz
« Citoyen »
1402312920000
    • Toyratz#0000
    • Profil
    • Derniers messages
    • Tribu
#546
  0
OMG what variable i wanna kknow
Enesxfbxpro
« Censeur »
1402323960000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#547
  0
I skip the cheese to enter the slot
Williamkang
« Citoyen »
1402344420000
    • Williamkang#0000
    • Profil
    • Derniers messages
#548
  0
Kiss for cheese a dit :
http://pastebin.com/jwNrbRLa

I put a lua so people can use it
Enesxfbxpro
« Censeur »
1402395900000
    • Enesxfbxpro#0000
    • Profil
    • Derniers messages
    • Tribu
#549
  0
Williamkang a dit :
I put a lua so people can use it

dont work
Fireyone
« Citoyen »
1402613880000
    • Fireyone#0000
    • Profil
    • Derniers messages
    • Tribu
#550
  0
Fxie's edit--
Light = {"33"}

function eventLoop(t,tr)
for i=1, 800, 10 do
tfm.exec.displayParticle(Light[math.random(#Light)],i,20,0,0,0,0,nil)
end
end
Potocopo
1402621260000
    • Potocopo#0000
    • Profil
    • Derniers messages
    • Tribu
#551
[Modéré par Muffun]
Xanmeow
« Citoyen »
1402628460000
    • Xanmeow#0000
    • Profil
    • Derniers messages
    • Tribu
#552
  0
Fireyone a dit :
Light = {"33"}

function eventLoop(t,tr)
for i=1, 800, 10 do
tfm.exec.displayParticle(Light[math.random(#Light)],i,20,0,0,0,0,nil)
end
end

I dont really get this
Safwanrockz
« Censeur »
1402629360000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#553
  0
Fireyone a dit :
Light = {"33"}

function eventLoop(t,tr)
for i=1, 800, 10 do
tfm.exec.displayParticle(Light[math.random(#Light)],i,20,0,0,0,0,nil)
end
end

Question: Why do you need to pick a random value out of a table that only contains one element?
+Eliaseeg
« Citoyen »
1402722180000
    • +Eliaseeg#0000
    • Profil
    • Derniers messages
#554
  0
Trying to test math.randomseed I created a small code of a map rotation without repeat the same map every time when you load the code (which happens with math.random). [size=5]bad english sry

local maps = {"1", "0", "3", "4", "5", "6", "7"}
math.randomseed(os.time())

function startGame()
local newMap;
repeat
newMap = maps[math.random(#maps)];
until newMap ~= tfm.get.room.currentMap
tfm.exec.newGame (newMap)
end

startGame()


I think it works correctly.

Edit: idea of test math.randomseed from hina, tkm

Dernière modification le 1402755480000
Fireyone
« Citoyen »
1403701020000
    • Fireyone#0000
    • Profil
    • Derniers messages
    • Tribu
#555
  0
Even though it's unuseful here


Fireyone a dit :

function eventChatCommand(name,command)
if command=="name" or "Name" then
ui.addTextArea(0,name .." is your name.")
end
end
P.S - Tell you your name :P
Daryan
« Citoyen »
1405452840000
    • Daryan#8539
    • Profil
    • Derniers messages
    • Tribu
#556
  0
adding conjuration with ducking
Duck to add conjuration a dit :
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 40, true, true)
end

function eventKeyboard(name, key, down, x, y)
if key == 40 then
tfm.exec.addConjuration(x/10, y/10, 100000)
end

tfm.exec.bindKeyboard(name, 40, true, true)
end

Dernière modification le 1405452900000
Emberkitx
« Citoyen »
1407153300000
    • Emberkitx#0000
    • Profil
    • Derniers messages
    • Tribu
#557
  0
is it possible to make one certain person be able to infinity jump?

e: oh my gosh I think I put this in the wrong thread wow I'm so sorry omg

Dernière modification le 1407154560000
Bad
« Citoyen »
1409144700000
    • Bad#9645
    • Profil
    • Derniers messages
    • Tribu
#558
  0
Hey, im no use in lua so would anyone mind showing me what's needed to create a teleportation script? A script which only teleports 1 specific player.
Jjaakkee
« Citoyen »
1409253780000
    • Jjaakkee#0000
    • Profil
    • Derniers messages
#559
  0
a dit :
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse("Badmanb", true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer(name, x, y, false, 0, 1, false)
end

Just change the "tfm.exec.movePlayer(name, x, y, false, 0, 1, false)"
So that it looks like "tfm.exec.movePlayer("Person You want to move", x, y, false, 0, 1, false)"

Ex.)
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse("Badmanb", true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer("Ahmedbob", x, y, false, 0, 1, false)
end
Bad
« Citoyen »
1410600660000
    • Bad#9645
    • Profil
    • Derniers messages
    • Tribu
#560
  0
Jjaakkee a dit :
a dit :
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse("Badmanb", true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer(name, x, y, false, 0, 1, false)
end

Just change the "tfm.exec.movePlayer(name, x, y, false, 0, 1, false)"
So that it looks like "tfm.exec.movePlayer("Person You want to move", x, y, false, 0, 1, false)"

Ex.)
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse("Badmanb", true)
end

function eventMouse(name, x, y)
tfm.exec.movePlayer("Ahmedbob", x, y, false, 0, 1, false)
end

Thanks
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 28 / 33 › »
© Atelier801 2018

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

Version 1.27