×

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
  • /
  • Module FAQ & Documentation
« ‹ 15 / 19 › »
Module FAQ & Documentation
Heniyengui
« Citoyen »
1520683320000
    • Heniyengui#0000
    • Profil
    • Derniers messages
#281
  0
Overjoy06 a dit :

Why won't it work? i tried fixing it but never works.

I think you are trying to give the player the cheese then making him go to the hole.
To give the player the cheese you need to use the tfm.exec.giveCheese(name) function.
The function you used is just an event that triggers when the player get the cheese.

+ the arguments in the eventChatCommand are playerName and command
So you need to do if command == "win" then
Code Lua

1
2
3
4
5
6
function eventChatCommand(playerName, command)
if command == "win" then
tfm.exec.giveCheese(playerName)
tfm.exec.playerVictory(playerName)
end
end
Bolodefchoco
« Sénateur »
1520683320000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#282
  0
-

the lord has answered above :3

Dernière modification le 1520683380000
Wtal
« Citoyen »
1522419720000
    • Wtal#5272
    • Profil
    • Derniers messages
    • Tribu
#283
  0
is there a way to find the gender of a player
Bolodefchoco
« Sénateur »
1522430940000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#284
  0
Mouseclick1 a dit :
is there a way to find the gender of a player

no :c
Wtal
« Citoyen »
1522483860000
    • Wtal#5272
    • Profil
    • Derniers messages
    • Tribu
#285
  0
oops. have to make a suggestion then ^^
Bolodefchoco
« Sénateur »
1522581720000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#286
  0
Mouseclick1 a dit :
oops. have to make a suggestion then ^^

https://atelier801.com/topic?f=6&t=383236&p=17#m331
Barberserk
« Consul »
1522951560000
    • Barberserk#0000
    • Profil
    • Derniers messages
    • Tribu
#287
  0
Where is the Unotfm thread? I want to brag about my cinema chair. :)
Bolodefchoco
« Sénateur »
1522971360000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#288
  0
Barberserk a dit :
Where is the Unotfm thread? I want to brag about my cinema chair. :)

https://atelier801.com/topic?f=6&t=846383&p=11#m204
King_seniru
« Censeur »
1523340360000
    • King_seniru#5890
    • Profil
    • Derniers messages
    • Tribu
#289
  1
Can u tell me how to spawn a water ground with its exact properties using tfm.exec.addPhysicObject
Bolodefchoco
« Sénateur »
1523362260000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#290
  1
King_seniru a dit :
Can u tell me how to spawn a water ground with its exact properties using tfm.exec.addPhysicObject

It's not possible
King_seniru
« Censeur »
1523422080000
    • King_seniru#5890
    • Profil
    • Derniers messages
    • Tribu
#291
  1
Oh then web grounds - that sticky thing?
Bolodefchoco
« Sénateur »
1523447760000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#292
  1
King_seniru a dit :
Oh then web grounds - that sticky thing?

doesn't work too
Wtal
« Citoyen »
1523712600000
    • Wtal#5272
    • Profil
    • Derniers messages
    • Tribu
#293
  0
how can we get the chat content like in funemployed. i mean not with chatcommand
eg: i say hi. then a textarea displays hi or any other word u tell.
Bolodefchoco
« Sénateur »
1523713440000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#294
  0
Mouseclick1 a dit :
how can we get the chat content like in funemployed. i mean not with chatcommand
eg: i say hi. then a textarea displays hi or any other word u tell.

Use eventChatMessage instead of eventChatCommand
Cheesepizza2
« Citoyen »
1524948840000
    • Cheesepizza2#6788
    • Profil
    • Derniers messages
#295
  0
How do we bind every single mouse in the room? I'm trying to use a for loop but I just started learning Lua and it's pretty confusing to use.
Bolodefchoco
« Sénateur »
1524951960000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#296
  3
Cheesepizza2 a dit :
How do we bind every single mouse in the room? I'm trying to use a for loop but I just started learning Lua and it's pretty confusing to use.

I know, it's confusing. You just need to go into the event idea..

Code Lua

1
2
3
4
5
6
7
-- When a player joins the room, you'll bind the keyboard TO HIM only
eventNewPlayer = function(name)
system.bindKeyboard(name, 32, true, true)
end

-- Act once like if every single mouse in the room had "just joined it"
table.foreach(tfm.get.room.playerList, eventNewPlayer)
King_seniru
« Censeur »
1526553660000
    • King_seniru#5890
    • Profil
    • Derniers messages
    • Tribu
#297
  0
Hi, can any pro tell me how to remove a shaman object that has been spawned with tfm.exec.addShamanObject at specific time intervals
eg:
>Spawned a cannon
>after 5s removed the cannons
>Spawned another thing
>destroyed those thing after 5s
>continue...
Bolodefchoco
« Sénateur »
1526565240000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#298
  0
King_seniru a dit :
Hi, can any pro tell me how to remove a shaman object that has been spawned with tfm.exec.addShamanObject at specific time intervals
eg:
>Spawned a cannon
>after 5s removed the cannons
>Spawned another thing
>destroyed those thing after 5s
>continue...

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local toDespawn = {}

do
local addShamanObject = tfm.exec.addShamanObject
tfm.exec.addShamanObject = function(...)
toDespawn[#toDespawn + 1] = {
addShamanObject(...),
os.time() + 5000
}

return toDespawn[#toDespawn][1]
end
end

eventLoop = function()
for k, v in ipairs(toDespawn) do
if os.time() > v[2] then
tfm.exec.removeObject(v[1])
table.remove(toDespawn, k)
end
end
end

Dernière modification le 1526565300000
King_seniru
« Censeur »
1526640600000
    • King_seniru#5890
    • Profil
    • Derniers messages
    • Tribu
#299
  1
Bolodefchoco a dit :
King_seniru a dit :
Hi, can any pro tell me how to remove a shaman object that has been spawned with tfm.exec.addShamanObject at specific time intervals
eg:
>Spawned a cannon
>after 5s removed the cannons
>Spawned another thing
>destroyed those thing after 5s
>continue...

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local toDespawn = {}

do
local addShamanObject = tfm.exec.addShamanObject
tfm.exec.addShamanObject = function(...)
toDespawn[#toDespawn + 1] = {
addShamanObject(...),
os.time() + 5000
}

return toDespawn[#toDespawn][1]
end
end

eventLoop = function()
for k, v in ipairs(toDespawn) do
if os.time() > v[2] then
tfm.exec.removeObject(v[1])
table.remove(toDespawn, k)
end
end
end

TY my pro. It works!
Antonio
« Sénateur »
1530059880000
    • Antonio#9975
    • Profil
    • Derniers messages
    • Tribu
#300
  0
Is it possible to assign different secret chats for different people or even messages only for one user.

Basically multiple chats at once, secretly for a certain amount of people.

is it also possible to filter the chat, and see if they say something.

Dernière modification le 1530060180000
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Module FAQ & Documentation
« ‹ 15 / 19 › »
© Atelier801 2018

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

Version 1.27