Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Dude27th

ACS : Set Font & Hud Message resolution problems

Question

Question : I have a hud effect on my mod which is some blood falling through the screen when you get a Game Over.
https://www.youtube.com/watch?v=OYHwY4Xz-d0

It uses ACS with SetFont and HudMessage to display this, but this way I need to have variations for every possible width resolution.

Is there and easier form to do this ? Like graphics can be stretched to screen width resolution ?

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0
12 hours ago, Kappes Buur said:

Do some experimenting with SetHudSize

Well , my original code was this:

#define rm        0.001
Script "GameOverFast" (void)
    {
    int w = GetScreenWidth();    // Width resolution.
    int ws = GetGameOverWideSelection(w);
    SetFont(SetGraphicFont(ws));
    int y=1700;
                    // Fast Blood/Goo Falling animation
                    while(y!=0.000)
                    {
                        HudMessage(s:"A";HUDMSG_PLAIN, 20000, 0, 0.0, y*rm,   1873);
                        delay(1);
                        y=y-10;
                    }
                    
      				//Last Position in a loop
                    while(true)
                    {
                        int w = GetScreenWidth();    // Width resolution.
                        int ws = GetGameOverWideSelection(w);
                        SetFont(SetGraphicFont(ws));
                        HudMessage(s:"A";HUDMSG_PLAIN, 20000, 0, 0.0,  0.0,   3.7);
                        Delay(1);
                    }
    }

 

 

Now I tried this:

#define rm		0.001
Script "GameOverFast" (void)
	{
	SetHudSize(640,400,TRUE);
	//int w = GetScreenWidth();	// Width resolution.
	//int ws = GetGameOverWideSelection(w);
	//SetFont(SetGraphicFont(ws));
	SetFont("GAM1640");
	int y=1700;
					// Fast Blood/Goo Falling animation
					while(y!=0.000)
					{
						HudMessage(s:"A";HUDMSG_PLAIN, 20000,0, 0.0, y*rm,   1873);
						delay(1);
						y=y-10;
					}
					                                         				
					while(true)
					{
						//int w = GetScreenWidth();	// Width resolution.
						//int ws = GetGameOverWideSelection(w);
						//SetFont(SetGraphicFont(ws));
						SetFont("GAM1640");
						HudMessage(s:"A";HUDMSG_PLAIN, 20000, 0, 0.0, 0.0,   3.7);
						Delay(1);
					}
	}

And it straight up doesn't work ! 

 

Share this post


Link to post
  • 0

Ok , so I read a little bit of SetHudSize , and if use it I can't move graphics by decimals on the screen ?

Share this post


Link to post
  • 0
On 7/12/2019 at 2:29 PM, Dude27th said:

Ok , so I read a little bit of SetHudSize , and if use it I can't move graphics by decimals on the screen ?

That's right.  You can still move the graphics, but you move them as described in the Coordinate Behavior section.

Share this post


Link to post
  • 0
Posted (edited)
19 hours ago, Empyre said:

That's right.  You can still move the graphics, but you move them as described in the Coordinate Behavior section.

OHHHHHHHHH.....
Thanks a lot ! ^^
For some reason I read it already but I thought I had to rework all the graphics and the animation. Maybe it won't be too much work then.
Thanks again ! ^^

Update:
It worked! :D
I had to cut the graphics in two because they where too large tho and coordinate both parts to show as one graphic.
But other than that is perfect now ^^

Edited by Dude27th : Update

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×