Search found 546 matches

by rjroldan1
Thu Jun 25, 2020 4:35
Forum: Decorations and Tools
Topic: Road Damage Pack
Replies: 1
Views: 107

Re: Road Damage Pack

Love it :)
by rjroldan1
Thu Jun 25, 2020 4:22
Forum: Plug-In Discussion
Topic: Can I detect a building upgrade through Lua?
Replies: 6
Views: 271

Re: Can I detect a building upgrade through Lua?

How would I know the location of the building though? It seems like you'd have to know that for this to work. Also, I need to check this for these upgrades on every frame. Im not sure but try this local draft = Draft.getDraft("Draft") function script:event(x,y,level,event) if event == Script.EVENT_...
by rjroldan1
Thu Jun 25, 2020 4:07
Forum: Lua Scripting
Topic: Drawing basics
Replies: 21
Views: 637

Re: Drawing basics

Also, how can I avoid issues like this, where the item appears in different areas of the screen when the resolution is different? Is there a way I can detect the screen resolution or orientation Use: local width,height = Drawing.getSize() It will detect the current resolution of the screen Or maybe...
by rjroldan1
Wed Jun 24, 2020 14:40
Forum: Plug-In Discussion
Topic: How can I make a notification recommend a building to a player in Lua?
Replies: 12
Views: 587

Re: How can I make a notification recommend a building to a player in Lua?

So let's change that then, shall we? image.png The game object I attach the script to is an animation. This is useful since it can hold some frames for us that we will use in the Lua code. There's no need to do it that way :json [ { "id":"$luanotificationstest00", "type":"animation", // Use animati...
by rjroldan1
Wed Jun 24, 2020 14:32
Forum: Resources
Topic: JSON
Replies: 71
Views: 9443

Re: JSON

TheFennekin wrote:
Wed Jun 24, 2020 14:22
Just a thought, is it possible to add capacity liken in schools and hospitals to a prison plugin?

Yes via lua :)
by rjroldan1
Wed Jun 24, 2020 10:56
Forum: Resources
Topic: JSON
Replies: 71
Views: 9443

Re: JSON

Where's the firebrigades?
by rjroldan1
Wed Jun 24, 2020 3:55
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Love it :)
by rjroldan1
Tue Jun 23, 2020 14:54
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Other questions....

Is it really posible to save the value of a variable even the player exits the game?
by rjroldan1
Tue Jun 23, 2020 14:27
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Thanks
by rjroldan1
Tue Jun 23, 2020 4:54
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Anyway how can i make Building only buildable when Region name returns true?
by rjroldan1
Mon Jun 22, 2020 15:02
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Ohh wait @Ølsken what's the role of "local number = 12" there based on my sent script?
by rjroldan1
Mon Jun 22, 2020 14:21
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

But thats still need lots of elseif conditions


Ok I get it thanks :)
by rjroldan1
Mon Jun 22, 2020 13:23
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Ølsken wrote:
Mon Jun 22, 2020 12:46
Long? Can you show the code?
Lets go PM
by rjroldan1
Mon Jun 22, 2020 12:20
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Hello again may i ask if this was an issue
IMG_20200622_174421.jpg
IMG_20200622_174421.jpg (10.8 KiB) Viewed 177 times
I used long "if, elseif " conditions and it works fine, I just want to ask if it is still valid even it has error like that ↑?
by rjroldan1
Mon Jun 22, 2020 3:11
Forum: Other
Topic: Eye protection filters v2
Replies: 11
Views: 249

Re: Eye protection filters v2

I dont think that it was an issue :calc
by rjroldan1
Sun Jun 21, 2020 16:07
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

It works well now Thanks for your help also :)

Hope this conversation would help others too :)
by rjroldan1
Sun Jun 21, 2020 16:05
Forum: Smalltalk
Topic: Anyone know History of Theotown?
Replies: 5
Views: 1781

Re: Anyone know History of Theotown?

CommanderABab wrote:
Fri Dec 27, 2019 0:58
https://youtu.be/7gY3_Zxjenw
I liked how cars and fountain animation moves so smooth
by rjroldan1
Sun Jun 21, 2020 15:30
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

... local _, rank, var2 function script:update() _, rank = City.getRank() end local var = function() var2 = rank * 1 end ... I you define a variable as local in a function it won't be accessible from outside of that function :teach Oh ok i get it this is just like getting the 2nd return info. To st...
by rjroldan1
Sun Jun 21, 2020 15:05
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

local flag1 = Draft.getDraft("AoSflag1") local flag2 = Draft.getDraft("AoSflag2") local flag3 = Draft.getDraft("AoSflag3") local flag4 = Draft.getDraft("AoSflag4") function script:update() local rank = City.getRank() end local var = function () local var2 = rank * 1 end function script:draw(tileX, ...
by rjroldan1
Sun Jun 21, 2020 15:02
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 868

Re: Lua chatbox

Lobby wrote:
Sun Jun 21, 2020 15:02
Please upload your whole code as text so I can edit it :)
Together with json?

Go to advanced search