Page 1 of 1

[Mod help]How do i make a Graphical User Interface?(GUI)

PostPosted: Wed Dec 11, 2013 17:05
by wtfsamcrap
Image
[h]How do i make
[url=s1279.photobucket.com/user/textcraft/media/Dec%202013%20-%202/868b2f1e3e6367311fff8dad1dce77de5426317f482f516ed37e71924c3eb7ca4f5ae9852500b3ffda39a3ee5e6b4b0d3255bfef95601890afd80709cebd48257e164450362f_zps2d999eb0.png.html/]this[/url] image a GUI?[/h]
Well i want the image to disappear after 60 seconds and it pop up on a right click of a block
and this is my code for hint
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
while true do
wait(30)
    minetest.chat_send_all("HINT ")
end

it is not showing HINT on the chat maby a function would work but i have no errors it works on a chat cmd like this maby it needs a Function idk
<Cmd>
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_chatcommand("idpchat", {
    params = "<msg>",
    description = "say <msg>",
    privs = {owner=true},
    func = function(name, param)
        minetest.chat_send_all("#####: " ..param)   
    end,
})

Please it would be helpfull for this image im making a security door block set for a fake door this is


next one i want a door that takes a code on rightclick and last a server Hint text GUI
how the hint i want to be:
at the top at all times and changeing
words:
Welcome to my server
Have fun
Dont hack
Sugjest mods



[h]SITES[/h]

Site 1
Site 2

PostPosted: Wed Dec 11, 2013 17:47
by rubenwardy
There are two types of GUIs.

Formspecs
These are windows like the inventory window.

HUDs
These are things like the crosshair, and the hearts, and the hotbar.

Sounds like you want formspecs.

PostPosted: Wed Dec 11, 2013 23:37
by wtfsamcrap
ok but how do i make the words not what they are T_T and i guese the HUDS
rubenwardy wrote:There are two types of GUIs.

Formspecs
These are windows like the inventory window.

HUDs
These are things like the crosshair, and the hearts, and the hotbar.

Sounds like you want formspecs.

PostPosted: Wed Dec 11, 2013 23:37
by wtfsamcrap
ok but how do i make the words not what they are T_T and i guese the fourmspaces lol telll me
rubenwardy wrote:There are two types of GUIs.

Formspecs
These are windows like the inventory window.

HUDs
These are things like the crosshair, and the hearts, and the hotbar.

Sounds like you want formspecs.

PostPosted: Thu Dec 12, 2013 15:51
by PandemoniuM
lol you the one saying you have epic mods, learn how to do it! No ones going to hold your hand, and the best way to do yourself a favor is to dive into code and do your best to understand whats going on.

There are mods that have GUI's, so take a look at them first

PostPosted: Thu Dec 12, 2013 15:53
by PandemoniuM
Also, that wasnt meant to be mean.

I dont help people who say 'tell me how to do this',

but i will help people who post code and say 'well its doing x and y, but not z. any ideas?'

PostPosted: Thu Dec 12, 2013 16:33
by Evergreen
PandemoniuM wrote:Also, that wasnt meant to be mean.

I dont help people who say 'tell me how to do this',

but i will help people who post code and say 'well its doing x and y, but not z. any ideas?'
That is my moto. Don't say "How do I write a mod that adds a cannon?" Trye writing it yourself, then if you have trouble say something like "Well I tried x, but it didn't work. What is the problem?"