Announcement

Collapse
No announcement yet.

simplifiying in range blue print.

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

    simplifiying in range blue print.

    Im working on an RPG and have written this BP when leveling up the player will gain stat points which they can place into what ever stat they want (Strength, dexterity, Vitality etc) think D&D or ragnarok online.

    Click image for larger version

Name:	BP_01.jpg
Views:	1
Size:	569.3 KB
ID:	1196157

    The BP DOES work but i feel like I have (unintentionally) overcomplicated it. Is there a simpler way of doing what I've done here or am i better off just collapsing this to a function and moving on?

    The start and end link into the level up BP. They arent connected here because i moved this group away to work on it.

    Thanks, appreciate any help.

    #2
    If you made the stat gains per level math based, you could write an equation. Otherwise I think a compare int node might be a bit cleaner. I'm tired right now so I did some pseudo math code.


    if (PlayerLevel % 10 == 0)
    {
    StatGainPerLevel = 7 * PlayerLevel / 10;
    }
    else
    {
    StatGainPerLevel = Ceiling(PlayerLevel / 10) + 1;
    }

    =====
    PlayerLevel = 5

    5 % 10 = 5.
    else
    5 / 10 = .5
    ceiling = 1
    Final: 1 + 1 = 2.

    =====

    PlayerLevel = 20

    20 % 10 = 0
    if
    Final: 7 * 20 / 10 = 14
    Last edited by Aesais; 10-01-2016, 09:11 AM.
    Marketplace code plugin: AesTargeting - Make your Actors targetable =)

    Comment


      #3
      Originally posted by Aesais View Post
      If you made the stat gains per level math based, you could write an equation. Otherwise I think a compare int node might be a bit cleaner. I'm tired right now so I did some pseudo math code.


      if (PlayerLevel % 10 == 0)
      {
      StatGainPerLevel = 7 * PlayerLevel / 10;
      }
      else
      {
      StatGainPerLevel = Ceiling(PlayerLevel / 10) + 1;
      }

      =====
      PlayerLevel = 5

      5 % 10 = 5.
      else
      5 / 10 = .5
      ceiling = 1
      Final: 1 + 1 = 2.

      =====

      PlayerLevel = 20

      20 % 10 = 0
      if
      Final: 7 * 20 / 10 = 14
      Thanks for the advice Aesais, I did consider doing something like that but i have a very specific final point count that i want to maintain, the level cap is 50 and in total you can get 228 points, it is that specific for a reason and doing it through math just makes the calculations way too difficult for my over worked grey cells

      appreciate the effort you've put in here though. thanks.

      Comment

      Working...
      X