Page 10 of 10
Re: Lua chatbox
Posted: 06 Dec 2021, 15:28
by CERRERA

- 20211206_232418.jpg (62.41 KiB) Viewed 21330 times
Anyone can help me?
If u press building or category you will go into link
Example I press the help category you will go to yt
Sorry Idk how lua works
Re: Lua chatbox
Posted: 22 Mar 2022, 17:51
by kyoshimine1
I have a question. I was creating a new plugin and it occurred to me that I could use Lua to do something....
Let's say, if I wanted the property
"conductive":true
Turn false, but only after a certain time since I entered the city, for example 5 minutes.
Would it be possible to do something like that using Lua?
Re: Lua chatbox
Posted: 25 Mar 2022, 22:56
by Hadestia
kyoshimine1 wrote: ↑22 Mar 2022, 17:51
I have a question. I was creating a new plugin and it occurred to me that I could use Lua to do something....
Let's say, if I wanted the property
"conductive":true
Turn false, but only after a certain time since I entered the city, for example 5 minutes.
Would it be possible to do something like that using Lua?
Do this method
If it toast the value you put from its json probably you can change it dynamically
Re: Lua chatbox
Posted: 16 Aug 2022, 12:07
by erksmit
What happens with a lua script when i enter online mode? Im trying to make a script compatible with it, its got multiplayer: false in its manifest.
Re: Lua chatbox
Posted: 17 Aug 2022, 20:10
by Hadestia
erksmit wrote: ↑16 Aug 2022, 12:07
What happens with a lua script when i enter online mode? Im trying to make a script compatible with it, its got multiplayer: false in its manifest.
It will still work but locally
Re: Lua chatbox
Posted: 30 Aug 2022, 15:35
by ian`
i realized the onDraw argument now ignores parent padding. is it a bug or a fix?

Re: Lua chatbox
Posted: 30 Aug 2022, 20:12
by JustAnyone
That is the intended change as of 1.10.73
Re: Lua chatbox
Posted: 20 Sep 2022, 20:43
by erksmit
With the addition of the Car module i had the idea of dynamically spawning cars with diffrent tails depending on what they carry (what they carry is decided within). Now i wanted to also dynamically set the animation of the car to show a certain resource on its cargo bed, but i noticed there are no functions to set a car's animation. Would it still be possible to do this?
Re: Lua chatbox
Posted: 23 Sep 2022, 10:27
by ian`
also the method to change the car despawn time when the car speed is zero. AFAIK, the default car despawn time is 10 days in normal speed.
Re: Lua chatbox
Posted: 01 Jun 2023, 16:52
by Frodo01
I don't understand what is wrong with this script. Nothing happens when the police car is at the coordinates of the road decoration.
function script.update()
-- Debug.toast("starting code!")
local car = Draft.getDraft('$carpolice00')
local carX = car.getX()
local carY = car.getY()
if Builder.isRoadDecoBuildable('$undead_horde_plugin_00', carX, carY) then
Builder.removeRoadDeco(carX, carY)
Debug.toast("destroy undead!")
end
end
Re: Lua chatbox
Posted: 01 May 2024, 16:49
by Armin Hpj
CERRERA wrote: ↑06 Dec 2021, 15:28
20211206_232418.jpgAnyone can help me?
If u press building or category you will go into link
Example I press the help category you will go to yt
Sorry Idk how lua works
Write lua script For Tutorial