×

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
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 14 / 38 › »
Module API FAQ
Fluffyshine
« Citoyen »
1380301440000
    • Fluffyshine#0000
    • Profil
    • Derniers messages
    • Tribu
#261
  0
Ethanrockz a dit :
How do I make a Fly command?

erm fly with [spacebar]?
Ethanrockz
« Citoyen »
1380302160000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#262
  0
i mean like when you do !Fly you will be able to fly
Baasbase
« Citoyen »
1380303180000
    • Baasbase#0095
    • Profil
    • Derniers messages
#263
  0
Ethanrockz a dit :
i mean like when you do !Fly you will be able to fly

Baasbase a dit :

fly = true

function eventNewGame()
for p in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(p, 32, true, true)
end
end

function eventKeyboard(p, key)
if fly and key == 32 then
tfm.exec.movePlayer(p, 0, 0, true, 0, -50, true)
end
end

function eventChatCommand(p, c)
if c == "fly" then
fly = not fly
end
end
Zutto
« Citoyen »
1380303840000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#264
  0
Baas it don't work for me D=
Moesappel
« Citoyen »
1380303960000
    • Moesappel#0000
    • Profil
    • Derniers messages
    • Tribu
#265
  0
Aritxy a dit :
Baas it don't work for me D=

First enter this code:
a dit :
function eventNewPlayer(name)
tfm.exec.bindKeyboard(name,32,true,true)
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventKeyboard(name,key,down,x,y)
if key==32 then
tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
end

and then:
a dit :

fly = true

function eventNewGame()
for p in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(p, 32, true, true)
end
end

function eventKeyboard(p, key)
if fly and key == 32 then
tfm.exec.movePlayer(p, 0, 0, true, 0, -50, true)
end
end

function eventChatCommand(p, c)
if c == "fly" then
fly = not fly
end
end
Tailtong
« Citoyen »
1380314460000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#266
  0
presenting the old version of tribes : the minigame
Ethanrockz
« Citoyen »
1380381540000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#267
  0
how to make a teleport command like in that room sham made
Shamousey
« Consul »
1380382680000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#268
  0
Ethanrockz a dit :
how to make a teleport command like in that room sham made

I'll write a tutorial on handling things like that to post in a few days, if you can wait :3
Zutto
« Citoyen »
1380382800000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#269
  0
Teletransportation whit 1 click:

for p in pairs (tfm.get.room.playerList) do
system.bindMouse(p);
end
function eventMouse(playerName, x, y)
tfm.exec.movePlayer(playerName, x, y);
end
Epicshawty
« Citoyen »
1380392700000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#270
  0
Aritxy a dit :
Teletransportation whit 1 click:

for p in pairs (tfm.get.room.playerList) do
system.bindMouse(p);
end
function eventMouse(playerName, x, y)
tfm.exec.movePlayer(playerName, x, y);
end

Wrong.
a dit :
for p,player in pairs(tfm.get.room.playerList) do
system.bindMouse(p,true)
end
function eventMouse(p,x,y)
tfm.exec.movePlayer(p,x,y)
end

That is correct ^ (it gives everyone the access to transport)
Tailtong
« Citoyen »
1380393960000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#271
  0
tribes : the minigame 2.0
Epicshawty
« Citoyen »
1380394080000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#272
  0
Tailtong a dit :
tribes : the minigame 2.0

How is this a minigame if this has a bunch of commands?
Tailtong
« Citoyen »
1380394080000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#273
  0
Epicshawty a dit :
How is this a minigame if this has a bunch of commands?

it is made for having fun in the tribe house ( if you don't have enough already )
Epicshawty
« Citoyen »
1380394200000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#274
  0
Tailtong a dit :
it is made for having fun in the tribe house ( if you don't have enough already )

Well true.
I like it.
If you dont mind I can shorten it out.
Tailtong
« Citoyen »
1380394320000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#275
  0
Epicshawty a dit :
Well true.
I like it.
If you dont mind I can shorten it out.

shorten what out
Epicshawty
« Citoyen »
1380394440000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#276
  0
Tailtong a dit :
shorten what out

Instead of using "name" or "command" you can use "p" or "c".
Tailtong
« Citoyen »
1380394440000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#277
  0
oh, thanks, i'll shorten it in ~1 hour (when i'm done with reading)
Epicshawty
« Citoyen »
1380394440000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#278
  0
Tailtong a dit :
oh, thanks, i'll shorten it in ~1 hour (when i'm done with reading)

Well I just did!
Shortened Version.
Tailtong
« Citoyen »
1380394620000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#279
  0
thank you very much, epic
Shamousey
« Consul »
1380394620000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#280
  0
Instead of shortening your code like that manually, may I interest you in a Lua Minifier?
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 14 / 38 › »
© Atelier801 2018

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

Version 1.27