×

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
  • /
  • Script Requests
« ‹ 35 / 160 › »
Script Requests
Kmlcan
« Citoyen »
1387539960000
    • Kmlcan#0000
    • Profil
    • Derniers messages
    • Tribu
#681
  0
Bushmeister a dit :
How to make everyone who is in a table displayed popup?

Hope it will help.
a dit :
tbl1={"This", "is", "a", "test"}
ui.addPopup(0,0,table.concat(tbl1, " "),nil,40,80)

Didn't try it yet, I will try when I log in.
Safwanrockz
« Censeur »
1387544280000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#682
  0
@Bushmeister:
The table.concat() function returns all the elements in the specified table, the second argument of it is how you want the elements to be seperated. (i.e table.concat(tbl,", ") will seperate each element of the table "tbl" with a comma).
Hope that helped!
Bushmeister
« Consul »
1387544700000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#683
  0
Wow! Thanks! ^-^
Arber
« Citoyen »
1387556700000
    • Arber#0000
    • Profil
    • Derniers messages
    • Tribu
#684
  0
clear every objects in the map with a command? is that possible
Zutto
« Citoyen »
1387565280000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#685
  0
a dit :
function eventNewGame()
tfm.exec.setUIMapName(""..tfm.get.room.currentMap.."")
end

Can someone put the author of the current map whit "..mapauthor.." ?
Something like that.

If is possible, whitout tables D= (Only if it is)

Thank very muuch :D !

And the category of the map? Is that possible?
Safwanrockz
« Censeur »
1387570020000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#686
  0
Arber a dit :
clear every objects in the map with a command? is that possible

~
a dit :

objects={}

function eventSummoningEnd(name,type,x,y,angle,vx,vy,itemDetails)
table.insert(objects, itemDetails.id)
end

function eventChatCommand(name,cmd)
if cmd=="clear" then
for k,v in ipairs(objects) do
tfm.exec.removeObject(v)
end
end
end

untested^

Aritxy a dit :
Can someone put the author of the current map whit "..mapauthor.." ?
Something like that.

If is possible, whitout tables D= (Only if it is)

Thank very muuch :D !

And the category of the map? Is that possible?

~
a dit :

function eventNewGame()
tfm.exec.setUIMapName("<J>"..tfm.get.room.xmlMapInfo.author.."<BL> - "..tfm.get.room.currentMap.." - <PT>"..tfm.get.room.xmlMapInfo.permCode)
end

untested as well.
Zutto
« Citoyen »
1387570140000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#687
  0
Safwanrockz a dit :
~

untested^


~

untested as well.

THANK VERY MUUUUUUUUUCH &lt;33333333

And do you know the Shaman's name?

To edit the name like Shaman: Aritxy (Santa)
Safwanrockz
« Censeur »
1387572840000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#688
  0
Aritxy a dit :
THANK VERY MUUUUUUUUUCH &amp;amp;lt;33333333

And do you know the Shaman's name?

To edit the name like Shaman: Aritxy (Santa)

You can do a workaround to store the shaman's name in a specific variable.

a dit :

function tfm.get.room.shaman()
for name,player in pairs(tfm.get.room.playerList) do
if player.isShaman then
shaman=name
end
end
return shaman
end

print(tfm.get.room.shaman())

UNTESTED
Zutto
« Citoyen »
1387573080000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#689
  0
Safwanrockz a dit :
You can do a workaround to store the shaman's name in a specific variable.


UNTESTED

That don't work but I found

tfm.get.player.isShaman

Can it be something like that?
Safwanrockz
« Censeur »
1387573500000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#690
  0
Then try this.
a dit :

function tfm.get.room.shaman()
local shamans = {};
for name,player in pairs(tfm.get.room.playerList) do
if player.isShaman then
shamans.insert(name)
end
end
return table.unpack(shamans)
end

print(tfm.get.room.shaman())

 
Shamousey
« Consul »
1387573740000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#691
  0
Aritxy a dit :
Can it be something like that?

tfm.get.room.playerList.Aritxy.isShaman
Safwanrockz
« Censeur »
1387574520000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#692
  0
player.isShaman is a boolean, I thought Artixy wanted a function that returns the current shaman.
Kittyepress
« Citoyen »
1387626360000
    • Kittyepress#0000
    • Profil
    • Derniers messages
#693
  0
that if someone dances that it will say "(playername) Is a superstar!" and works on tribe house
Tailtong
« Citoyen »
1387627260000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#694
  0
function eventEmotePlayed(p,id)
if id==0 then
ui.addTextArea(1,p.." is a superstar!",nil)
end
end
--untested
Zutto
« Citoyen »
1387627260000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#695
  0
Kittyepress a dit :
that if someone dances that it will say "(playername) Is a superstar!" and works on tribe house

a dit :

function eventEmotePlayed(playerName, emote)
if emote==0 then
ui.addTextArea(0, ""..playerName.." is a Super Star !", playerName, 200, 100, 183, 50, 6976916, 0, 1.1)
end
end

f
Shamousey a dit :
tfm.get.room.playerList.Aritxy.isShaman

I try whit
a dit :
function eventNewGame()
tfm.exec.setUIShamanName(""..tfm.get.room.playerList.Aritxy.isShaman.."(The Shaman) ")
end

But doesn't work, and try in the name, whit nil, name, playerName... But doesn't work.

I need the shaman's name like the "..tfm.get.room.xmlMapInfo.author.." D=

But thanks !
Zutto
1387627620000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#696
[Modéré par Icewolfbob, raison : Accidental double post]
Safwanrockz
« Censeur »
1387632000000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#697
  0
Aritxy a dit :

a dit :



function tfm.get.room.shaman()
local shamans = {};
for name,player in pairs(tfm.get.room.playerList) do
if player.isShaman then
shamans.insert(name)
end
end
return table.unpack(shamans)
end

function eventNewGame()
tfm.exec.setUIMapName(tfm.get.room.shaman.." (The Shaman)"
end

 
Zutto
« Citoyen »
1387632600000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#698
  0
Safwanrockz a dit :
 

I do this whit your code:

a dit :
function tfm.get.room.shaman()
local shamans = {};
for name,player in pairs(tfm.get.room.playerList) do
if player.isShaman then
shamans.insert(name)
end
end
return table.unpack(shamans)
end

function eventNewGame()
tfm.exec.setUIMapName(tfm.get.room.shaman)
end

The name of the shaman in the map's code, but the function says:

function: 49b0cd6e

I'm trying to fix it but I don't know
Shamousey
« Consul »
1387639380000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#699
  0
Aritxy a dit :
I do this whit your code:
The name of the shaman in the map's code, but the function says:

function: 49b0cd6e

I'm trying to fix it but I don't know

To excecute a function you need the parenthesis on the end for the argument parameters. Try tfm.get.room.shaman()
Safwanrockz
« Censeur »
1387640400000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#700
  0
Shamousey a dit :
To excecute a function you need the parenthesis on the end for the argument parameters. Try tfm.get.room.shaman()

Oh, I was confused about these parenthesis. Why don't API functions have them? Such as tfm.get.room.currentMap? (I guess it's a table)
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 35 / 160 › »
© Atelier801 2018

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

Version 1.27