ividyon will never get this done, will he.

Custom HUD Face Prompt

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

xortion
Skaarj Scout Skaarj Scout
Posts: 15
Joined: 26 Oct 2012, 07:11

Subject: Custom HUD Face Prompt

Post Posted: 11 May 2013, 09:03

Hello all,

I came up with the idea of being able to have a face prompt and text like in ChallengeHUD, except that a different actor would contain the variables for that.

For example, let's say it's a touch trigger with a string and texture and it would somehow call the player HUD function to display said string and texture in the top left corner like ChallengeHUD, referring to this:

Code: Select all

function DrawTalkFace(Canvas Canvas, int i, float YPos)
{
   if ( !bHideHUD && !PawnOwner.PlayerReplicationInfo.bIsSpectator )
   {
      Canvas.DrawColor = WhiteColor;
      Canvas.Style = ERenderStyle.STY_Normal;
      Canvas.SetPos(FaceAreaOffset + 4*Scale, 4*Scale);
      Canvas.DrawTile(FaceTexture, YPos - 1*Scale, YPos - 1*Scale, 0, 0, FaceTexture.USize, FaceTexture.VSize);
      Canvas.Style = ERenderStyle.STY_Translucent;
      Canvas.DrawColor = FaceColor;
      Canvas.SetPos(FaceAreaOffset, 0);
      Canvas.DrawTile(texture'LadrStatic.Static_a00', YPos + 7*Scale, YPos + 7*Scale, 0, 0, texture'LadrStatic.Static_a00'.USize, texture'LadrStatic.Static_a00'.VSize);
      Canvas.DrawColor = WhiteColor;
   }
}

And the related text message code...

I'm having trouble coming up with valid methods to do this without running into things such as the replication info and having to weave through a bunch of different actors. I've come up with a few scripts that sort of led to dead ends one way or another. The problem isn't the HUD function, it's how to call it from another actor.

Basically: does anyone have any suggestions as to how this could be approached in a simpler manner? I'm basically just trying to have a trigger prompt text and texture on the HUD.

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject: Re: Custom HUD Face Prompt

Post Posted: 13 May 2013, 04:38

Do you have a custom HUD? If not, you're going to go through hell to get this working. If you have a custom HUD, just set up a boolean like bSpecialFaceDisplay or something and let your custom actor call YourHUD.bSpecialFaceDisplay=True and then switch it back to false when it's done. Something like that should work, but may need to be more complex. HUD stuff is still fairly new to me right now, but I am trudging through it too.
Image

xortion
Skaarj Scout Skaarj Scout
Posts: 15
Joined: 26 Oct 2012, 07:11

Subject: Re: Custom HUD Face Prompt

Post Posted: 13 May 2013, 20:05

Yep, I do have a custom HUD. I actually began to set up the kind of bool you were talking about a little bit before you posted it, though I haven't tested it out. Thanks for the advice.


Who is online

Users browsing this forum: No registered users and 27 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited