Search found 3139 matches
- Wed Jul 01, 2020 14:12
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
Did you use Builder.isRoadDecoBuildable to check if it is buildable in the first place? Road decorations can define requirements like flags and alignment for the road they can be placed on.
- Wed Jul 01, 2020 10:00
- Forum: News
- Topic: Plugin Store Activity in June 2020
- Replies: 0
- Views: 2218
Plugin Store Activity in June 2020
<r>Hello everyone, it's time for some Plugin Store statistics!<br/> <br/> <SIZE size="200"><s>[size=200]</s>New Plugins<e>[/size]</e></SIZE><br/> In total <B><s>[b]</s>113 new plugins<e>[/b]</e></B> have been submitted in June 2020. Most of them were contributed by:<br/> <SIZE size="120"><s>[size=12...
- Mon Jun 29, 2020 22:06
- Forum: Plug-In Discussion
- Topic: Sneak peak for my space plugin!
- Replies: 119
- Views: 16140
Re: Sneak peak for my space plugin!
It looks kind of dark, but also really modern 

- Mon Jun 29, 2020 20:16
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
-- Bearbear local function seperate(value) local result = "" value = tostring(value):reverse() for set in value:gmatch("..?.?") do result = result..set.."," end result = result:sub(1, -2):reverse() return result end -- Internet function comma_value(amount) local formatted = amount while true do for...
- Mon Jun 29, 2020 16:35
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
Found another solution that also uses gsub here : function comma_value(amount) local formatted = amount while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if (k==0) then break end end return formatted end print(comma_value(1234567)) In other languages you'd be able to u...
- Mon Jun 29, 2020 15:56
- Forum: Problems and Errors (bugs)
- Topic: Wrong night animation
- Replies: 3
- Views: 1646
- Mon Jun 29, 2020 10:45
- Forum: Jailhouse Rock
- Topic: yes
- Replies: 14
- Views: 3774
Re: yes
Yo
- Sun Jun 28, 2020 15:26
- Forum: Tutorials and Documentation
- Topic: Night Animations
- Replies: 45
- Views: 10199
Re: Night Animations
That upcoming version will also support color within animation spot definitions instead of only within the animation draft definitions. Could look like that: image.png You can either specify a color directly within a color object (like "color":{r:...}) or provide an id of a color that was defined be...
- Sat Jun 27, 2020 16:17
- Forum: Game Discussion
- Topic: Changing the numbers in seeds
- Replies: 1
- Views: 761
Re: Changing the numbers in seeds
No, the numeric seed value is only used for construction of the random number generator that is used for map generation: Random(long seed) Pseudo number generators aim to produce some sort of random numbers based on a seed value. The generated numbers are supposed to show no similarities for similar...
- Sat Jun 27, 2020 13:58
- Forum: Plug-In Discussion
- Topic: How can I detect when "Hide UI" mode is used?
- Replies: 1
- Views: 734
Re: How can I detect when "Hide UI" mode is used?
You can use this

Code: Select all
if not TheoTown.SETTINGS.hideUI then
-- Draw your stuff
end
- Thu Jun 25, 2020 23:00
- Forum: Problems and Errors (bugs)
- Topic: You can't build underground one-way railway
- Replies: 5
- Views: 1713
Re: You can't build underground one-way railway
Sorry, this one was my mistake, will be fixed 

- Wed Jun 24, 2020 15:12
- Forum: Plug-In Discussion
- Topic: How can I make a notification recommend a building to a player in Lua?
- Replies: 12
- Views: 1660
Re: How can I make a notification recommend a building to a player in Lua?
Simply use
in the call to showNotification to get red of the close button. Just add your own buttons to replace it 
There's no technical limit on the amount of buttons that it supports, but on smaller screens you will run into displaying issues.
Code: Select all
closeable = false

There's no technical limit on the amount of buttons that it supports, but on smaller screens you will run into displaying issues.
Re: JSON
It's not included because it also contains a premium building, however, here's the rest of it: { "id":"$firedepartment01", "type":"fire brigade", "width":1, "height":1, "frames":[{"x":1888,"y":1296,"w":32,"h":35}], "animation":[ {"id":"1x3l", "x":7, "y":-7}, {"id":"1x3l", "x":19, "y":-6}, {"id":"$an...
- Tue Jun 23, 2020 17:24
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
Yes, there are tables that will be saved and restored when the player comes back. Saving Lua data persistently So called storage tables can be used to to store data in a persistent way. City.getStorage() Is saved within the city file, so it's useful to save city dependent stuff in it. TheoTown.getSt...
- Mon Jun 22, 2020 19:45
- Forum: Problems and Errors (bugs)
- Topic: iPhone suddenly stopped working
- Replies: 4
- Views: 1613
Re: iPhone suddenly stopped working
Hi, version 1.8.83 had this bug but the fixed version 1.8.85 should already be available in the AppStore 

- Mon Jun 22, 2020 13:41
- Forum: Smalltalk
- Topic: Little Help here!
- Replies: 1
- Views: 914
Re: Little Help here!
Hi, it should be available in the "gameplay" category in the settings.
- Mon Jun 22, 2020 10:27
- Forum: Game Discussion
- Topic: Can we transfer progress on to another phone via our old phone?
- Replies: 3
- Views: 936
Re: Can we transfer progress on to another phone via our old phone?
Yeah, simply copy the TheoTown folder from your old to your new device 
For purchases and stuff you have to be connected to an account within the game, preferrably to your Forum account.

For purchases and stuff you have to be connected to an account within the game, preferrably to your Forum account.
- Sun Jun 21, 2020 23:39
- Forum: Map Showcase
- Topic: South Mesanico region (roleplay)!
- Replies: 8
- Views: 2553
- Sun Jun 21, 2020 15:02
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
Please upload your whole code as text so I can edit it 

- Sun Jun 21, 2020 14:57
- Forum: Lua Scripting
- Topic: Lua chatbox
- Replies: 161
- Views: 9054
Re: Lua chatbox
Yes, because your var2 was also declared as local within a function 
