×

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
« ‹ 6 / 19 › »
Module FAQ & Documentation
Hurricane
« Citoyen »
1442670060000
    • Hurricane#8296
    • Profil
    • Derniers messages
    • Tribu
#101
  0
Who have script with a spolier , if click on an button, appears an text area, after exist in text-area another buttons.. ans so on.. plz
Velspar
« Citoyen »
1442706060000
    • Velspar#0000
    • Profil
    • Derniers messages
    • Tribu
#102
  0
Andrutaiubi a dit :
Who have script with a spolier , if click on an button, appears an text area, after exist in text-area another buttons.. ans so on.. plz

Should ask this is in the script request thread, but ill give you a good idea how to do it...

Make a text area, and with the string output (2nd argument), use;
'<a href="event:EVENTNAME"> Some Text </a>'

In the eventTextAreaCallback() function, with the event name, you can do whatever you want from there.
Make the text area bigger, and add text. Make a new text area. Anything....
If you want it to keep going, just do the same thing inside the callback functions.

(Going off the top of my head.)
Hurricane
« Citoyen »
1442863740000
    • Hurricane#8296
    • Profil
    • Derniers messages
    • Tribu
#103
  0
velspar a dit :
Andrutaiubi a dit :
Who have script with a spolier , if click on an button, appears an text area, after exist in text-area another buttons.. ans so on.. plz

Should ask this is in the script request thread, but ill give you a good idea how to do it...

Make a text area, and with the string output (2nd argument), use;
'&lt;a href="event:EVENTNAME"&gt; Some Text &lt;/a&gt;'

In the eventTextAreaCallback() function, with the event name, you can do whatever you want from there.
Make the text area bigger, and add text. Make a new text area. Anything....
If you want it to keep going, just do the same thing inside the callback functions.

(Going off the top of my head.)

Oh i wrong thead.Tnx for u help
Zyx
« Censeur »
1445214120000
    • Zyx#8690
    • Profil
    • Derniers messages
#104
  0
is there a spawn ID for the mouse in the map editor so you can spawn a mouse
Velspar
« Citoyen »
1445261940000
    • Velspar#0000
    • Profil
    • Derniers messages
    • Tribu
#105
  0
Swirlfire a dit :
is there a spawn ID for the mouse in the map editor so you can spawn a mouse

Mice spawns are decorations, the Module API doesnt have any functionality with decorations.
The only way you can do any interaction with decorations, is through the maps XML code.

If you want to set a spawn point in Lua, you could iterate each player when the game begins. Moving them to the spawn position.
If you want them to revive at that position, you may have to respawn and move them to that position when the player dies.

If this is about the Map Editor, you should go look in the Map Editor Section.
Gekkeiju
« Citoyen »
1445678460000
    • Gekkeiju#0000
    • Profil
    • Derniers messages
    • Tribu
#106
  0
Question about reversed maps.
When a map is loaded reversed, how can the script notice that? Is xmlMapInfo.xml different from that of the original one?

I'm making a module in which coordinates of grounds are recorded at eventNewGame from xmlMapInfo.xml. That data of grounds location is used later for collision detection in game. So, if the actual arrangement of grounds is different from what is written in xmlMapInfo.xml the game won't works correctly.

I'm making another module, the script of which contains some specific coordinates for a map with the map code itself. In other words, the script has a list like this :
mapList = {{code = "@10000", pos = {100, 200}}, {code = "@50000", pos = {324, 190}}}
According to this list, when a map in the list is loaded, the script adds textAreas (ui.addTextArea) at the positions paired with the map. So, if the map is reversed the script is going to add textAreas at somewhere unexpected. Isn't it?

I want to know if I need to take these problems into consideration or not. And if I do how should I deal with them.
Shamousey
« Consul »
1445692260000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#107
  0
No, there's no way to detect flipped maps. The XML isn't different for them and there's no other thing that gives it away, other than the visuals on your client.
Gekkeiju
« Citoyen »
1445693340000
    • Gekkeiju#0000
    • Profil
    • Derniers messages
    • Tribu
#108
  0
Thanks. It seems I need to think more about my scripts.
Guinevere
« Citoyen »
1446049440000
    • Guinevere#2630
    • Profil
    • Derniers messages
#109
  0
Thx ^^
Abdeltif
« Citoyen »
1446120600000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#110
  0
Transformice's Lua API has JUST updated to 0.20 !
OMG COLOR PICKER
FIRST ONE TO NOTICE THE UPDATE !!!!!!
Shamou you're documentation is outdated now :D
Velspar
« Citoyen »
1446136980000
    • Velspar#0000
    • Profil
    • Derniers messages
    • Tribu
#111
  0
tfm.exec.playEmote(nil, 0)
Instant dance party hehe
Hiumee
« Citoyen »
1446143880000
    • Hiumee#9737
    • Profil
    • Derniers messages
    • Tribu
#112
  0
:o
eventEmotePlayed(name, emote id, flag)

more control.. trololol
Konicmis
1446816540000
    • Konicmis#0000
    • Profil
    • Derniers messages
#113
[Modéré par Shamousey, raison : Please speak English on the EN forums.]
Moshimoshiz
« Citoyen »
1447887900000
    • Moshimoshiz#0000
    • Profil
    • Derniers messages
    • Tribu
#114
  0
Can someone please tell me if this works. If it doesn't please tell me how to fix it or fix it yourself for me.
I'm trying to make a minigame.



tfm.exec.setVampirePlayer("insert name here with quotation marks")
function eventPlayerVampire(playerName)
print(insert name here with two dots.." is now a vampire!")
end
function eventNewGame()
print("Welcome to Champire. Who will be the vampire this round? Type .!help for more info.")
end
print("Make sure you change the name Moshimoshiz for the vampire to the person you want to be the vampire! :D")


system.disableChatCommandDisplay("help",true)

ui.addPopup(1,0,"Welcome to Champire! The object of the game is to not be turned into a vampire. If you are not turned into a vampire
you will get the cheese and get back into the mouse hole without getting turned into a vampire also. If there are any bugs, please contact Moshimoshiz and it should get fixed right away.",nil,180,300,200,true)
tfm.exec.disableAfkDeath(true)
Shamousey
« Consul »
1448061480000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#116
  0
objectList is only for shaman objects, like anvils, cannons and planks. Grounds aren't shaman objects and are treated differently. There's no way to get the co-ordinates of a dynamic ground.
Podoko
« Citoyen »
1448111640000
    • Podoko#0000
    • Profil
    • Derniers messages
    • Tribu
#118
  0
You can use tfm.get.room.xmlMapInfo.xml and try to catch all datas from the map using patterns.
Sadly, this won't work with dynamic grounds :/

Here's an old (french) script to do so :
- Script You can check this (french) topic to see how to use it
- the important function : table xml_unpack.loadXml ( String xml ) -- Returns a table with all gathered informations from the given xml

Dernière modification le 1448111820000
Abdeltif
« Citoyen »
1448126880000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#119
  0
Animjarcanin a dit :
I thought so.
Therefore I must summon each ground with addPhysicObject.
Then I save this ground's parameters to a table!
Thus I can get the parameters later...

I wish we could get the coordinates and properties of grounds mainly dynamic ones, then we would have so MANY possibilities. ( the ones with the lua property )
If I could vote for what comes in the next TFM Lua api update , It would be that.
Though the script Podoko gave you would be helpful for non-dynamic grounds

Dernière modification le 1448127060000
Mmmmmmmmmmmmmmm
« Citoyen »
1449775560000
    • Mmmmmmmmmmmmmmm#4582
    • Profil
    • Derniers messages
    • Tribu
#120
  0
Hello, i run #infected in the tribehouse (801 map), the map didnt changed, all mouses got "meep" ability but the vampire didnt appears, what am i doing wrong?
wrong place probably

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

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

Version 1.27