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

User avatar
wtfsamcrap
Member
 
Posts: 25
Joined: Mon Dec 09, 2013 21:23
Location: Look behind you :)

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

by wtfsamcrap » Wed Dec 11, 2013 17:05

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
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>
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
Last edited by wtfsamcrap on Sun Dec 22, 2013 17:47, edited 1 time in total.
Mods
 

User avatar
rubenwardy
Moderator
 
Posts: 5858
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Wed Dec 11, 2013 17:47

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.
Last edited by rubenwardy on Wed Dec 11, 2013 17:56, edited 1 time in total.
 

User avatar
wtfsamcrap
Member
 
Posts: 25
Joined: Mon Dec 09, 2013 21:23
Location: Look behind you :)

by wtfsamcrap » Wed Dec 11, 2013 23:37

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.
Mods
 

User avatar
wtfsamcrap
Member
 
Posts: 25
Joined: Mon Dec 09, 2013 21:23
Location: Look behind you :)

by wtfsamcrap » Wed Dec 11, 2013 23:37

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.
Last edited by wtfsamcrap on Wed Dec 11, 2013 23:38, edited 1 time in total.
Mods
 

PandemoniuM
New member
 
Posts: 9
Joined: Wed Dec 04, 2013 03:38

by PandemoniuM » Thu Dec 12, 2013 15:51

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
 

PandemoniuM
New member
 
Posts: 9
Joined: Wed Dec 04, 2013 03:38

by PandemoniuM » Thu Dec 12, 2013 15:53

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?'
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Dec 12, 2013 16:33

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?"
Back from the dead!
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 2 guests