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()
the position of an actor on screen (zscript quistion)
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 412
- Joined: Fri Nov 25, 2016 7:17 am
- Location: some northern german shithole
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
-
- Posts: 1562
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: the position of an actor on screen (zscript quistion)
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
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