Have an actor draw something on a player's screen?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
User avatar
hideousdestructor
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Have an actor draw something on a player's screen?

Post by hideousdestructor »

Is there a way to get something like this in ZScript:

Code: Select all

CLIP A 1{ //FAKE CODE
    if(
        playeringame[0]
        &&players[0].mo
        &&distance3d(players[0].mo)<64
    )
    players[0].DrawOnScreen("BAL1A0", (0,0), DI_SCREEN_CENTER...
}
wait;
i.e., have an arbitrary actor or thinker manipulate a player's screen, without any menus or statusbar replacements?
User avatar
m8f
 
 
Posts: 1524
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Location: Siberia (UTC+7)

Re: Have an actor draw something on a player's screen?

Post by m8f »

Screen.DrawTexture?

There are some examples here and there.
User avatar
hideousdestructor
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Have an actor draw something on a player's screen?

Post by hideousdestructor »

Right, so basically the only way is to create a RenderOverlay event handler.

Would've liked to have been able to do it directly from the thinker but I guess it's still better than a statusbar hack...

Return to “Scripting”