Page 1 of 1

the position of an actor on screen (zscript quistion)

Posted: Thu Aug 23, 2018 11:42 am
by Zen3001
how can find out where on the screen an actor is?
what I'm trying to do is recreate 'Hudmessageonactor' in zscript, after looking into gzdoom.pk3 the function I'm supposed to use is DrawImage()

Re: the position of an actor on screen (zscript quistion)

Posted: Thu Aug 23, 2018 12:02 pm
by Apeirogon
Look into this mod
viewtopic.php?f=103&t=58470

Re: the position of an actor on screen (zscript quistion)

Posted: Thu Aug 23, 2018 12:03 pm
by ramon.dexter
Hi, I think Gutawer or argv can help you with this task. I got a sweet 'use to pickup' zscript mod developed by argv, using gutawer's gutamatics library.

Here's a link to use to pickup mod. It uses the gutawer's gutamatics library, that's build of maths required to draw things on screen based on ... well, honestly, I don't understand a single line of that. It's mathematics needed to correctly draw things on screen. Gutawer can tell you more. And I think this is basically what you need to actually replicate the 'Hudmessageonactor' in zscript.
Argv made the use to pickup, which brings modern approach to picking up things. No more walking over them. No, no. You have to target it with crosshair, then it draws ractangle around it and allows pickup by pressing use. So I think argv can help you how to draw text on screen based on actor's coordinates.
viewtopic.php?t=61369