Module API FAQ |
Epicshawty « Citoyen » 1378501200000
| 0 | ||
Is there a code to run ONLY survivor maps? Or I have to add them manually? |
Shamousey « Consul » 1378501740000
| 0 | ||
tfm.exec.newGame("#10") |
Epicshawty « Citoyen » 1378501740000
| 0 | ||
Shamousey a dit : thanks e: do i have to loop that? or the scripts restart when the new game starts? |
Codework « Citoyen » 1378504140000
| 0 | ||
Epicshawty a dit : use this tfm.exec.disableAutoNewGame(true) function eventLoop(currentTime,timeRemaining) [tab]if timeRemaining <= 1000 then [tab][tab]tfm.exec.newGame("#10") [tab]end end |
Epicshawty « Citoyen » 1378507860000
| 0 | ||
Codework a dit : danke' |
Bigcrushes « Citoyen » 1378548960000
| 0 | ||
http://pastebin.com/6iM2gsps ATTEMPT 2!!PLEASE TEST FOR ME D: |
Tailtong « Citoyen » 1378549080000
| 0 | ||
Bigcrushes a dit : or you could just ask some lua tester to run it and you could see it yourself too |
Shamousey « Consul » 1378549500000
| 0 | ||
Bigcrushes a dit : Maybe you shouldn't ask for people to test it, rather just let people look at your code and see if anything's wrong with it. On lines 4, 5, and 6, you have an end - but only two things to end (the opening function, and if statement). The only other problem (although not a technical one) is that when a new player joins, that welcome message will be sent to everyone. |
Abdeltif « Citoyen » 1378561020000
| 0 | ||
I need help here , What does % refer to ? |
Thewav « Citoyen » 1378561740000
| 0 | ||
Look the lua doc about string and format() |
Abdeltif « Citoyen » 1378562400000
| 0 | ||
Mm , how to pop up a text box ? |
Bigcrushes « Citoyen » 1378562520000
| 0 | ||
maybe this will help kikoo.formice.com/doku.php?id=module_api_documentation |
Abdeltif « Citoyen » 1378562520000
| 0 | ||
Bigcrushes a dit : I am reading it , but i don't find it |
0 | ||
ui Package (very bottom) addPopup Int id, Int type, String text, String targetPlayer, Int x, Int y, Int width Add a popup. Popup type : 0 (simple), 1 (yes or no), 2 (player input). If targetPlayer is NIL, it sends it to all players. e.g.: ui.addPopup(1,0,"Hello, close this.") -- shows for everyone since target wasn't defined and is positioned in the top left since x/y/w weren't defined |
Abdeltif « Citoyen » 1378562760000
| 0 | ||
Fxie a dit : Thanks , this would help me. Since you are here , what does % mean ?? |
Bigcrushes « Citoyen » 1378562940000
| 0 | ||
Fxie a dit : up one page. She explained it. hope helps :3 |
0 | ||
When comparing numbers, % is the modulus operator, explained on page 8. It gives you the remainder of division between a%b (a/b). 8%2 is 0 (no remainer), 9%2 is 1 (the remainder of 9/2). In strings (as you might see in some translations), %s, %d, and other cases are used for formatting. "Hello %s." is replaced with "Hello Abdeltif." This is useful for different languages for the same strings that print the same information regardless of language (usernames, numbers, etc.) Unless you have a firm understanding of Lua already, I strongly advise you NOT WORRY ABOUT THIS. You'll just end up confusing yourself more starting too far. |
Abdeltif « Citoyen » 1378563060000
| 0 | ||
Fxie a dit : OH THANKS ! Better then typing a long text :] Sorry for double post again How to make a team go to x,y and the other one go to x,y Using the same way that fxie showed in Page 8 [Sentinel] Please just edit your post by clicking the little icon next to 'edit' under your avatar. Thanks! |
Abdeltif 1378565760000
| | ||
[Modéré par Bolinboy, raison : double post] |
0 | ||
for i,name in ipairs(teams[1]) do tfm.exec.movePlayer(name,x,y) end for i,name in ipairs(teams[2]) do tfm.exec.movePlayer(name,x,y) end |