Announcement

Collapse
No announcement yet.

How Do I Increment Render Scale for Widget Image?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How Do I Increment Render Scale for Widget Image?

    I am currently having trouble trying to increment the size of my outline, in my player HUD, for when your health is less than 20%. Essentially it's an outline that will continually expand and then once it reaches the number 3 in scale, it will then reset and do it over and over and over again, until your health is greater than 20%. However, UE4 doesn't seem to have an effective way to increment scale and I was wondering if anyone had any ideas or if I just overlooked something and was being stupid. Any help would be much appreciated! Below is my blueprint layout. Also I was contemplating doing a for loop, but not sure if it would work, since set render scale only sets the scale rather than increments:

    Last edited by Dylanrockin; 04-30-2018, 09:37 PM.

    #2
    Originally posted by Dylanrockin View Post
    I am currently having trouble trying to increment the size of my outline, in my player HUD, for when your health is less than 20%. Essentially it's an outline that will continually expand and then once it reaches the number 3 in scale, it will then reset and do it over and over and over again, until your health is greater than 20%. However, UE4 doesn't seem to have an effective way to increment scale and I was wondering if anyone had any ideas or if I just overlooked something and was being stupid. Any help would be much appreciated! Below is my blueprint layout. Also I was contemplating doing a for loop, but not sure if it would work, since set render scale only sets the scale rather than increments:

    You can just use a timeline. Make a float in timeline that starts from min scale to Max scale, let's just say, in 1 sec. Keep the timeline to repeat until hp is over 20%.
    Checkout Project "TwinBlaster" my current game in progress.
    [FREE] - 2D ROPE! Find out more here!
    Forgive my username... It's an old game name and wrote it down as a habit.

    Comment


      #3
      Originally posted by SkeetonYu View Post

      You can just use a timeline. Make a float in timeline that starts from min scale to Max scale, let's just say, in 1 sec. Keep the timeline to repeat until hp is over 20%.
      The problem here is that I'd have to cast it to TimelineComponent, which I'm not entirely familiar with what the object reference for that would be. If you know, then I'd gladly use this method, since I actually had this in the back of my mind at one point, but didn't think much of it.

      Comment


        #4
        Originally posted by Dylanrockin View Post

        The problem here is that I'd have to cast it to TimelineComponent, which I'm not entirely familiar with what the object reference for that would be. If you know, then I'd gladly use this method, since I actually had this in the back of my mind at one point, but didn't think much of it.
        Sorry I forgot Timeline doesn't exist in widget, but you can also just make an widget animation loop. Just play it when player hp is below 20%.

        Last edited by SkeetonYu; 05-02-2018, 11:31 PM. Reason: Did some googling for you to add video.
        Checkout Project "TwinBlaster" my current game in progress.
        [FREE] - 2D ROPE! Find out more here!
        Forgive my username... It's an old game name and wrote it down as a habit.

        Comment

        Working...
        X