Print "in game" messages

LoseTheGame
Member
 
Posts: 33
Joined: Fri Oct 10, 2014 13:06

Print "in game" messages

by LoseTheGame » Fri Oct 10, 2014 13:13

Hi guys,

This is probably something pretty simple but I can't find how to do it. If I used print("hi") it will print it in the command console. How do I print messages in the actual game window like it does when you use in-game commands?

Cheers,

Jonty
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Print "in game" messages

by Krock » Fri Oct 10, 2014 13:23

Welcome to Minetest.
Here's a simple code example of adding a new chat command dev.minetest.net

There is an useful file, called "lua_api.txt" and you can find it in minetest_folder\doc\
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

LoseTheGame
Member
 
Posts: 33
Joined: Fri Oct 10, 2014 13:06

Re: Print "in game" messages

by LoseTheGame » Fri Oct 10, 2014 13:39

Thanks for replying so quickly Krock and thanks for pointing out the lua_api file :)
 

LoseTheGame
Member
 
Posts: 33
Joined: Fri Oct 10, 2014 13:06

Re: Print "in game" messages

by LoseTheGame » Fri Oct 10, 2014 14:25

That's working fine now thanks. I'm a maths teacher and I've created a mod for my students where they have to build cuboids of a given volume :)
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

Re: Print "in game" messages

by hoodedice » Sun Oct 12, 2014 03:42

LoseTheGame wrote:That's working fine now thanks. I'm a maths teacher and I've created a mod for my students where they have to build cuboids of a given volume :)


Wow, that sounds like a really cool mod. Mind putting that up on github?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Print "in game" messages

by twoelk » Sun Oct 12, 2014 21:14

LoseTheGame wrote:...
I'm a maths teacher and I've created a mod for my students where they have to build cuboids of a given volume :)

Cool !
Could you add a little something about using Minetest as a tool for teaching to this thread? Minetest Could Be An Educational Tool
so that others may gain more insight on how Minetest could be used in classes. You may also find links to other usefull mods for use with pupils in that thread.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests