×

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
« ‹ 34 / 38 › »
Module API FAQ
Shamousey
« Consul »
1397357640000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#661
  0
Laagaadoo a dit :
The #mobileId parameter in addImage replaces the image of the object or adds an image to the object?
What happens if the image is bigger than the object?

It replaces the image of the object. If the image is bigger than the object, then it'll just go over and look wrong.
Lilyblol
« Citoyen »
1397510880000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#662
  0
Did they patch getting cheese in module/minigame rooms?
Shamousey
« Consul »
1397511420000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#663
  0
Lilyblol a dit :
Did they patch getting cheese in module/minigame rooms?

Not as far as I'm aware, you can still earn 1 shop cheese every 2 minutes.
Lilyblol
« Citoyen »
1397511660000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#664
  0
Shamousey a dit :


Not as far as I'm aware, you can still earn 1 shop cheese every 2 minutes.

Been playing some sham and racing maps in a bafflua room and I haven't gotten a cheese since I've been here with my friend

Edit: So I'm guessing they disabled getting 1 cheese every 2 minutes for unofficial minigames (not on /module)? It seems like that, because of the cheese farming
Cabesinhadej
1397657160000
    • Cabesinhadej#0000
    • Profil
    • Derniers messages
    • Tribu
#665
[Modéré par Icewolfbob, raison : Spam / Flood]
Lolitavip
« Citoyen »
1397747280000
    • Lolitavip#0000
    • Profil
    • Derniers messages
    • Tribu
#666
  0
Hi. I want to ask a question. Here is my code.

MyCode a dit :

txt="abcde fghij klmno pqrst uvwxy"

function exAtoB(str,a,b) --extract string from a to b
local head=string.find(str,a,1)
local tail=string.find(str,b,1)
local exStr=nil
if head and tail then
exStr=string.sub(str,head,tail)
end
return(exStr)
end

function main()
local t=exAtoB(txt,"f","j")
print(t)
local whereFis=string.find(t,"f",0)
print(whereFis)
end

main()

Although I expected it print out "1", it says "f" is 7th place of the variable "t". I found out the solution by myself that concatenate string with blank string in order to initialize it. Just like [[ t=t .. "" ]]. Whatever I think this is not the right way. So I'd like to know how am I supposed to script it.
Fireyone
« Citoyen »
1397773140000
    • Fireyone#0000
    • Profil
    • Derniers messages
    • Tribu
#667
  0
I was wondering if the Module has a "gets.chomp" and "put" output, is it ? or does lua have another name for it ?
Moepl
« Citoyen »
1397826900000
    • Moepl#0095
    • Profil
    • Derniers messages
#668
  0
Lolitavip a dit :
Hi. I want to ask a question. Here is my code.
Although I expected it print out "1", it says "f" is 7th place of the variable "t". I found out the solution by myself that concatenate string with blank string in order to initialize it. Just like [[ t=t .. "" ]]. Whatever I think this is not the right way. So I'd like to know how am I supposed to script it.

Smells like Tigbug.
Fireyone a dit :
I was wondering if the Module has a "gets.chomp" and "put" output, is it ? or does lua have another name for it ?

I never did code anything in ruby but "put" seems to be the same as "print" here
"gets.chomp" seems to be a function to get terminal input + removing newlines (\n). That doesn't make sense for tfm-lua.
Tabithadog
« Citoyen »
1397841000000
    • Tabithadog#0000
    • Profil
    • Derniers messages
#669
  0
when It's not there age for become module API?
Fireyone
« Citoyen »
1397866860000
    • Fireyone#0000
    • Profil
    • Derniers messages
    • Tribu
#670
  0
Tabithadog a dit :
when It's not there age for become module API?

There is no age is free to apply just know coding fluently...

Thank you old friend ~ Moepl
Shamousey
« Consul »
1397867760000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#671
  0
Tabithadog a dit :
when It's not there age for become module API?

It's not a staff position, so there is no age limit for it.
Lolitavip
« Citoyen »
1397871600000
    • Lolitavip#0000
    • Profil
    • Derniers messages
    • Tribu
#672
  0
Moepl a dit :

Smells like Tigbug.

I see. Thank you Moepl.
Tabithadog
« Citoyen »
1397875920000
    • Tabithadog#0000
    • Profil
    • Derniers messages
#673
  0
Fireyone a dit :


There is no age is free to apply just know coding fluently...

Thank you old friend ~ Moepl

Shamousey a dit :


It's not a staff position, so there is no age limit for it.

Oh thanks :)
Coal
« Citoyen »
1398161280000
    • Coal#0010
    • Profil
    • Derniers messages
    • Tribu
#674
  0
Is there a way to stop the shaman from spawning certain items? I'm currently removing the objects which don't match allowed object ids once spawned but there is a delay meaning it could still cause problems
Makinit
« Citoyen »
1398165240000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#675
  0
Xarrj a dit :
Is there a way to stop the shaman from spawning certain items? I'm currently removing the objects which don't match allowed object ids once spawned but there is a delay meaning it could still cause problems

You could kill and optionally respawn the shaman when they start spawning certain items.
Coal
« Citoyen »
1398166620000
    • Coal#0010
    • Profil
    • Derniers messages
    • Tribu
#676
  0
Makinit a dit :

You could kill and optionally respawn the shaman when they start spawning certain items.

Thank you! Killing the shaman, respawning then moving back to orginal position worked great :D
Edit: After testing some more, I found that if I kept holding to spawn it would still spawn even after being killed&respawned.
Edit2: I found that using moveobject & removeobject together work best, almost instantly removed now :)
For anyone who wants:
Me a dit :

tfm.exec.moveObject(other['id'], 1, 1, 1, 1, 1, 1)
tfm.exec.removeObject(other['id'])

change other to whatever you called the last var in eventSummoningEnd
Makinit
« Citoyen »
1398170460000
    • Makinit#0095
    • Profil
    • Derniers messages
    • Tribu
#677
  0
Xarrj a dit :
Edit2: I found that using moveobject & removeobject together work best, almost instantly removed now :)

You might want to just move them way off screen so they don't interfere with the game and automatically despawn.
Blackmanb
« Citoyen »
1398452700000
    • Blackmanb#0000
    • Profil
    • Derniers messages
#678
  0
Joinniw Lua tester?
Vinixxzzzaaa
1398913740000
    • Vinixxzzzaaa#0000
    • Profil
    • Derniers messages
    • Tribu
#679
[Modéré par Omghost, raison : OP quote.]
Esh
« Censeur »
1399393740000
    • Esh#0095
    • Profil
    • Derniers messages
    • Tribu
#680
  0
There is a bug that allows anyone use images without be dev. What is the problem? Users are using this script to make "fake-events" and disclouse privates servers in tribe house.You can add a image by using the script:
tfm.exec.newGame([[<C><P D="x_bateaupirate.png#200#200#200" /><Z><S /><D /><O /></Z></C>]])
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 34 / 38 › »
© Atelier801 2018

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

Version 1.27