[Help] Setting XP Bar to 0 After Level Completed

I have 3 vars:

  1. MaxXP
  2. CurrentXP
  3. TotalXP
    In the percentage I just make CurrentXP / MaxXP. ( for the bar )
    When a level is completed I set Current XP to 0, then the bar depletes.
    But I want to check, if the TotalXp is != CurrentXP, I do that, after it a have a doOnce, but I don’t know how, the doOnce is executing a lot of times… take a look, How am I suppose to set the Total XP?

What Am I doing: Total Uscore = TotalXP; Uscore = CurrentXP
Any Ideas?
Thanks,
Alanzote.

Hi Alanzote,

From what I see in this picture, if the DoOnce loop is executing multiple times, that would mean that these values are equal to each other at multiple points. That would cause the != check to return false and trigger the ‘Reset’ pin on the DoOnce, allowing it to be triggered again. I would suggest using some print string nodes to display these values at runtime so you can debug the issue.

Hope this helps!

I’ve Done that, looks like the SERVER ( it runs on a dedicated server ) ouputs FALSE and the CLIENT True… That’s really ODD.

Ah, I was unaware that this was a replication issue between server and client. I’ll need some more time to look into why this could be happening.

It seems that there are issues with dedicated servers in general in the current version of the engine. For your reference, the bug number is UE-17542. It is possible that the general issues with dedicated servers are causing this strange behavior. I would suggest attempting this again after the general issue has been resolved.

Have a nice day,