I noticed I can not ask 10 or more questions by Event Tick that I need to know every delta second of game play. If i do, the FPS will slowly drop until it reaches 0 during game play. (even while standing in place)
What should I be using then if I should not be using the Event Tick?
I am only updating on Health, Stamina, Weapons ability, and 8 more roughly to gauge similar info.
Not sure what screen shots anyone might like to see, it would be broken down in images to see my nodes for Player Event Tick.
If I haven’t provided enough info, just ask, i will show, or explain.
Thanks to anyone out there.
Use onTick only for information that is really needed on a per tick bases. Mostly physics calculation will require this.
If you want to keep track of a health value for example, only update the display when the health value changes. There is no need to constantly monitor the value on tick.
This is indeed bad practice.
Can you clarify what you mean. The update does only run when there is a need for it, but say If i put when the player loses all health to run an action on begin play, it wont function as begin play runs once at the start.
For example here is my death tick.
I did run through since i roughly just started this project and found that when I unplugged my sequence for Event Tick, all runs fine.
I am making a fan version of Zelda. So I need to have things like Sword updates, Bow updates, Sprinting, and few more.
For the img above, I am not using the hearts health on the HUD, but a sectioned bar that can be upgraded 2 times.
My Health Bar Upgrade Tick
I dont understand your question in regards to the begin play event.
What I mean is, asuming you have a health variable in your player character, do the following:
- Establish a reference to the widget in the player character
- Add a function “Modify health” to the player that modifies the value and changes the widget info
That should be it. No need for tick or timers.
pps: If you really dont get it, I could make a little demo video
So You are saying as long as I set it in a Function, it wont run like it is simply put on Event Tick in whole?
From what I saw in yoyr screen shot you seem to recreate the widget allover every time. there is no need for that.
Its very easy to set up an example and show you in a little video to make things clearer.
But that wont happen until tomorrow, since in my timezone, its getting reeeaallyy late by now
I also covered this in a tutorial series (which remained incomplete for reasons), but it also covers some other stuff.
There you can see where I use “normal” function calls for updates, but also do use tick on the sprinting (stamina depletion) but still just call a function on the widget update
I just cant remebre in which part of the series I covered that.
Actually I feel a bit dumb as I saw the issue almost immediately after uploading the image. I was creating a widget every tick when setting the health bar upgrades. setting a do once stopped the FPS drop.
Just wait until tomorrow when I’ll show you an even yet more elegant way
ps: I think is is epsisode 2 or 3 in my series where i set this up
I will check the videos out and see if it can help. Thanks