Lua chatbox
Moderators: Scenario Moderators, Plugin Moderators
- CERRERA
- Townsman
- Posts: 48
- Joined: 25 Jan 2020, 06:19
- Location: Philippines
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Lua chatbox
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
- kyoshimine1
- Townsman
- Posts: 50
- Joined: 03 Oct 2020, 00:11
- Location: Japan
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: Lua chatbox
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
Would it be possible to do something like that using Lua?
Let's say, if I wanted the property
"conductive":trueTurn 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?
- Hadestia
- Inhabitant of a Megalopolis
- Posts: 727
- Joined: 17 Jul 2017, 16:16
- Location: Philippines
- Plugins: Showcase Store
- Contact:
-
Plugin Creator
Platform
Re: Lua chatbox
Do this methodkyoshimine1 wrote: ↑22 Mar 2022, 17:51I 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":trueTurn 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?
If it toast the value you put from its json probably you can change it dynamically
- JustAnyone
- Developer
- Posts: 3579
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Lua chatbox
That is the intended change as of 1.10.73
- erksmit
- Villager
- Posts: 24
- Joined: 02 Mar 2018, 12:39
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Re: Lua chatbox
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
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
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