hudprint position and RGB

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
TheStoryteller01
Posts: 20
Joined: Wed Dec 31, 2014 3:29 am
Contact:

hudprint position and RGB

Post by TheStoryteller01 »

I've worked with several editors and usually it's possible to give hud texts x/y coordinates and RGB values .

But whatever I try to script, it doesn't work - is there even a way to customise hudprint?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: hudprint position and RGB

Post by minmay »

Use the PartyComponent.onDrawGui method for this. You can see fields of the "context" object here and the asset definition reference for Grimrock 1 explains the methods that aren't new to Grimrock 2. The ones that are should be self-explanatory from the prototypes, except for one very useful piece of information: drawParagraph returns the height of the paragraph that was just drawn.
I doubt you can change anything about an hudPrint other than the string that gets printed. It's there so that you can print quick messages that match up with "Secret Found", "Discovered new spell...", "Steve gained a level!", and so on, not for making your own HUD.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply