Dynamic data display

Post Reply
ann123
New member
Posts: 7
Joined: Tue Feb 21, 2023 10:14

Dynamic data display

by ann123 » Post

How to display dynamic data in a sign board or simple board? is it possible? I have used this code, but it is not working. Can someone help me.


function display_data()
local pos = {x=-4, y=14, z=134}
local node = minetest.get_node(pos)
if node.name == "signs:label_medium" then
local meta = minetest.get_meta(pos)
meta:set_string("text", "Hello, World!")
minetest.set_node(pos, node)
end
end

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Dynamic data display

by Blockhead » Post

Use the digilines LCD or textline.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Dynamic data display

by ShadMOrdre » Post

Most likely, you are not using the signs from default MTG, but using the signs from display modpack. If this is the case, you can try using the following function from the signs_api mod.

Code: Select all

signs_api.set_display_text(pos, text, font)

Shad

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests