Search found 12 matches

by Temgamer
27 Jun 2020, 08:08
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 189
Views: 78174

Re: Lua chatbox

Also, is it possible to make console command require arguments? I tried TheoTown.registerCommand("testt", function(arg)) but this seems doesn't work how I expected I don't think there are any arguments. What do you want to do? I just wanted to make a command, which would set radius and zo...
by Temgamer
27 Jun 2020, 00:53
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 189
Views: 78174

Re: Lua chatbox

Also, is it possible to make console command require arguments? I tried TheoTown.registerCommand("testt", function(arg)) but this seems doesn't work how I expected
by Temgamer
26 Jun 2020, 22:49
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 189
Views: 78174

Re: Lua chatbox

How to set a console command with TheoTow.registerCommand()? I've tried putting it in script:init() and it doesn't work
by Temgamer
26 Jun 2020, 22:14
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 189
Views: 78174

Re: Lua chatbox

May i ask? How can i build a zones with a radius of 5 from the example building (as the center of the zone radius) I've wrote sort of function for that, it requires x and y of your building, ID of zone and radius. I tested it several times with different radiuses and it works great function buildZo...
by Temgamer
25 Jun 2020, 01:05
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

Re: script:click() doesn't work

Ah you're getting a little bit confused with how TheoTown uses functions. You don't put values in script:click(x, y, level) instead you put in variables like x, y, level (a variable is a word that can have a mutateable (changeable) value). The general rule would be when you declare functions (using...
by Temgamer
24 Jun 2020, 21:27
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

Re: script:click() doesn't work

It might be expecting the id of a building and not coordinates. I've tried entering id of that building, also a name of it, for some reason, but it still doesn't work. That's description of click() on the Lua wiki, in parameters there is only numbers Screenshot_20200624-221554_Chrome.jpg Also, I ch...
by Temgamer
24 Jun 2020, 20:19
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

Re: script:click() doesn't work

CommanderABab wrote: 24 Jun 2020, 19:51 OK. What does the lua function look like? :)
It should show me a toast, when I'm tapping at something at x:10 and y:10

Code: Select all

function script:click(10,10)
  Debug.toast("click test")
end
by Temgamer
24 Jun 2020, 19:35
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

Re: script:click() doesn't work

CommanderABab wrote: 24 Jun 2020, 19:09 Needs [ at the start and ] at the end if that is the complete json. :)
It's a part of bigger json file, only it uses that script. Also, 6th line in .lua file is where the "script:click()" is located
by Temgamer
24 Jun 2020, 18:55
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

Re: script:click() doesn't work

Yes, there is the building, which uses that script: { "id":"$radioo2", "type":"decoration", "category":"$0xadg_cat", "frames":[{"bmp":"radio.png"}], "width":1, "height":1, "title":...
by Temgamer
24 Jun 2020, 16:41
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 4744

[Resolved]script:click() doesn't work

I've been writing some simple script, which will activate, when player tap on a building on some coordinates. function script:click(10,10) Debug.toast("click test") end But when I'm trying to start the game it returns this error: Screenshot_20200624-173751_TheoTown.jpg Where is the problem...
by Temgamer
24 Jun 2020, 15:22
Forum: Problems
Topic: [Possibly resolved]Fun sound clipping
Replies: 3
Views: 1976

[Possibly resolved]Fun sound clipping

So, I'm making some sort of music player using Fun attribite. Here is the code: { "id":"$hl_02_sound", "type":"sound", "file":"Half-Life02.mp3" }, { "id":"$radioo", "type":"decoration", ... "on c...
by Temgamer
27 Nov 2017, 19:25
Forum: Problems
Topic: ✔Categories error
Replies: 2
Views: 1453

✔Categories error

When I try to add buildings to a category, I get an error as in the picture. What I do wrong? There is a code of building: [ {"id":"$radioact_storage", "type":"$temg_nuclear00", "author":"Temgamer", [ { "id":"$temg_nuclear00&...

Go to advanced search