×

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
« ‹ 17 / 19 › »
Module FAQ & Documentation
Finerlobster
« Citoyen »
1580332560000
    • Finerlobster#0000
    • Profil
    • Derniers messages
    • Tribu
#321
  0
Is there a function to play animations, like dancing, sleeping, etc? Didn't find it...
Bolodefchoco
« Sénateur »
1580342400000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#322
  1
Finerlobster a dit :
Is there a function to play animations, like dancing, sleeping, etc? Didn't find it...

This FAQ is terribly outdated. Check the official documentation instead.

a dit :
• tfm.exec.playEmote ( playerName, emoteId, emoteArg )
 Makes a player do an emote.
 Parameters:
  - playerName (String) : the player who should do the emote
  - emoteId (Int) : the emote to do
  - emoteArg (String) : the emote attribute (for the flag emote for example) (default value = nil)
Ninissdoga
« Citoyen »
1585501500000
    • Ninissdoga#0000
    • Profil
    • Derniers messages
#323
  0
Hi

- Is the whole game coded in Lua or only modules ?
- Where can I find data policy ? I would like to save the player's progression in a database. Am I free to host it anywhere?
Bolodefchoco
« Sénateur »
1585507320000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#324
  0
Ninissdoga a dit :
Hi

- Is the whole game coded in Lua or only modules ?
- Where can I find data policy ? I would like to save the player's progression in a database. Am I free to host it anywhere?

1) Only modules are coded in Lua, the rest is in Java, ActionScript and others.
2) All I managed to find in the ToS related to this is
a dit :
(f) Collecting, stocking, publishing or sharing private data on another user without Atelier 801 SARL express consent.

, but you're allowed to save your module's player data in a notepad or something like that. To use system.savePlayerData you will need to join the Module Team.
Perfecteca
« Sénateur »
1588542180000
    • Perfecteca#0000
    • Profil
    • Derniers messages
    • Tribu
#325
  0
How to center the text in text area with HTML?
What is wrong with tfm.exec.newGame function when I paste an XML?

Dernière modification le 1588543560000
Bolodefchoco
« Sénateur »
1588562280000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#326
  0
Perfecteca a dit :
How to center the text in text area with HTML?

<p align='center'>text</p>

Perfecteca a dit :
What is wrong with tfm.exec.newGame function when I paste an XML?

If you don't show it there's no way to know the problem.
Perfecteca
« Sénateur »
1588583040000
    • Perfecteca#0000
    • Profil
    • Derniers messages
    • Tribu
#327
  0
Bolodefchoco a dit :
Perfecteca a dit :
How to center the text in text area with HTML?

<p align='center'>text</p>

Thanks! Is it also possible to change text size?

Bolodefchoco a dit :
Perfecteca a dit :
What is wrong with tfm.exec.newGame function when I paste an XML?

If you don't show it there's no way to know the problem.

I decided to use map code instead of XML, thanks again
Cepejjaa
« Citoyen »
1590340560000
    • Cepejjaa#0000
    • Profil
    • Derniers messages
    • Tribu
#328
  0
Remove

Dernière modification le 1590340680000
Cepejjaa
« Citoyen »
1590340620000
    • Cepejjaa#0000
    • Profil
    • Derniers messages
    • Tribu
#329
  0
Sry, i was fixed.

Dernière modification le 1590344340000
Extremq
« Citoyen »
1591748880000
    • Extremq#0000
    • Profil
    • Derniers messages
    • Tribu
#330
  0
Perfecteca a dit :
Bolodefchoco a dit :
Perfecteca a dit :
How to center the text in text area with HTML?

<p align='center'>text</p>

Thanks! Is it also possible to change text size?

Bolodefchoco a dit :
Perfecteca a dit :
What is wrong with tfm.exec.newGame function when I paste an XML?

If you don't show it there's no way to know the problem.

I decided to use map code instead of XML, thanks again

To change font size (and color, in case you were going to ask that):
Code Lua

1
<font size='16' color='#ffffff'>Text</font>
Cepejjaa
« Citoyen »
1595856960000
    • Cepejjaa#0000
    • Profil
    • Derniers messages
    • Tribu
#331
  0
Do you know how to spend time at TextArea? (Disappearing) And after that, the map changes.
Erenm
« Censeur »
1595879520000
    • Erenm#8955
    • Profil
    • Derniers messages
    • Tribu
#332
  0
Thanks!
Kit_kat
« Citoyen »
1595882940000
    • Kit_kat#2700
    • Profil
    • Derniers messages
#333
  0
So, I want to make it when M it kills a certain snows lol but nothing works soo uh
Boxofkrain
« Censeur »
1596039540000
    • Boxofkrain#0000
    • Profil
    • Derniers messages
    • Tribu
#334
  0
Kit_kat a dit :
So, I want to make it when M it kills a certain snows lol but nothing works soo uh

soo uh maybe show the code?
King_seniru
« Censeur »
1603424940000
    • King_seniru#5890
    • Profil
    • Derniers messages
    • Tribu
#335
  5
New lua update!

New command:

  • /luahelp - Displays the lua tree and the documentation


New enum for tfm.enum:

- tfm.enum.bonus
a dit :

  • point (Number) : 0
  • speed (Number) : 1
  • death (Number) : 2
  • spring (Number) : 3
  • booster (Number) : 5
  • electricArc (Number) : 6

New methods:

a dit :

• tfm.exec.setWorldGravity ( wind, gravity )
 Sets the gravity and the wind of the map
 Parameters:
  - wind (Number) : the wind (default = 0)
  - gravity (Number) : the gravity (default = 10)


• tfm.exec.addBonus ( type, x, y, id, angle, visible, targetPlayer )
 Adds a defilante token
 Parameters:
  - type (Number) : type of the bonus, one from tfm.enum.bonus (default = 1 (speed))
  - x (Number) : x position of the bonus (default = 0)
  - y (Number) : y position of the bonus (default = 0)
  - id (Number) : the id assigned to the bonus, to be used in tfm.exec.removeBonus and eventPlayerBonusGrabbed (default = 0)
  - angle (Number) : the rotation angle (degrees) (default = 0)
  - visible (Boolean) : if the bonus is visible/displayed (default = true)
  - targetPlayer (String) : the player to display the token to (default = nil (everyone))


• tfm.exec.removeBonus ( id, targetPlayer )
  Removes a defilante token by id
 Parameters:
  - id (Number) : the id of the bonus, created with tfm.exec.addBonus (default = 0)
  - targetPlayer (String) : the player to remove the token from (default = nil (everyone))


New events:

a dit :

• eventPlayerBonusGrabbed ( playerName, id )
 Triggered when a player touched/grabbed a defilante token
 Parameters:
  - playerName (String) : the name of the player who touched the token
  - id (Number) : the id of the token


Examples

a dit :

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
tfm.exec.setWorldGravity(5, 0.2) -- sets the wind to 5 and gravity to 0.2

tfm.exec.addBonus(
tfm.enum.bonus.point, -- 0 (bonus type)
100, -- x position
100, -- y position
1, -- id
0, -- angle
true, -- visible
nil -- target (everyone)
)

tfm.exec.addBonus(
tfm.enum.bonus.point, -- 0 (bonus type)
200, -- x position
200, -- y position
2, -- id
0, -- angle
true, -- visible
nil -- target (everyone)
)

function eventPlayerBonusGrabbed(playerName, id)
print(playerName .. " grabbed the bonus with id " .. id)
-- lets remove the bonus with id 2 if the player grabbed bonus 1
if id == 1 then
tfm.exec.removeBonus(2, playerName)
end
end

Dernière modification le 1603507140000
Bolodefchoco
« Sénateur »
1611437340000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#336
  1
This thread has been updated with all recent changes!
Purple_days
« Citoyen »
1615571100000
    • Purple_days#2627
    • Profil
    • Derniers messages
#337
  0
Massi is a #0095 and Bolodefchoco is a #0015 now, that should probably get changed
Bolodefchoco
« Sénateur »
1615571700000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#338
  0
Purple_days a dit :
Massi is a #0095 and Bolodefchoco is a #0015 now, that should probably get changed

Thanks for noticing!
Purple_days
« Citoyen »
1615578180000
    • Purple_days#2627
    • Profil
    • Derniers messages
#339
  0
Bolodefchoco a dit :
Purple_days a dit :
Massi is a #0095 and Bolodefchoco is a #0015 now, that should probably get changed

Thanks for noticing!

No worries! <3
Bolodefchoco
« Sénateur »
1617410640000
    • Bolodefchoco#0095
    • Profil
    • Derniers messages
    • Tribu
#340
  0
Thread updated:

- addImage has got two new parameters: anchorX and anchorY
- tfm.exec.getPlayerSync ( )
- tfm.exec.setPlayerSync ( playerName )

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

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

Version 1.27