Both events are triggered as I saw with the print string nodes. But only the top path is working, I can change the Widget from its default visibility [hidden] to visible but not back.
I’M DESPERATE FOR HELP I TRIED FOR 2H TO FIND THE ISSUE!!!
Both events are triggered as I saw with the print string nodes. But only the top path is working, I can change the Widget from its default visibility [hidden] to visible but not back.
I’M DESPERATE FOR HELP I TRIED FOR 2H TO FIND THE ISSUE!!!
Have you tried to put the Stop of the Animation before settings its visibility?
It happens to me sometimes, that a still running Animation of a Widget, sets its visibility to visible again.
Thank you for the reply but that didn’t work unfortunately.
Do you see them print once or more often? Could you show or explain what the animation is doing?
More often, both Events can activate when the Health variable is changing, either because the Character takes damage or because it regenerates health.
The second event is activated every time the health value changes if its is already above 50%. So if I have 10% and regenerate up to 20% it doesn’t do anything, But if I have 51% and I regenerate to 61% it activates. Taking damage also works.
The first event does exactly the opposite, so it activates when the health value changes in the range 1-50%.
Following the logic you’ve described, what are the chances those events trigger in the incorrect order, and the value becomes overridden?
Could you somehow set it up in such a way that the visibility change happens only once. Just for now, just to test whether its the widget behaviour that is at fault, or perhaps something else is a factor.
When you say:
more often
Is this behaviour event driven or are you sampling something on Tick to determine when the changes is supposed to take place?
Also, just in case:
Could you place this on Tick anywhere and see if it prints 1. Assuming there should ever be only one of those widgets present. That’s how it’s supposed to work, right? Only one should be there?
Yes there should definitely only be one widget!
I unplugged the original events and bound the same setup to press key events. If I press them they are definitely activated but nothing changes.
But now I have the issue of an sheer infinite number of widgets that make the game really laggy after around 300. And because I unplugged the original events, I now know that I have a problem with another widget but no clue which one.
Any Idea on how to test which widget is causing this with out having to delete them one by one?
But you were really helpful already so thanks a lot!
Here is a video of the Print String results:ZombieGame Unreal Editor 2022 08 12 12 31 35 - YouTube
That’s what I was actually expecting. You hide 1 widget and there are 300 lurking underneath because too many are added. Looks like we’re creating 1 every frame
? I think we’ll need to revisit the logic of creating those widgets.
activated every time the health value changes
Could you explain how this is supposed to work, ideally? What is the widget for - from the gameplay’s perspective. It shows health loss / gain? Is this the player’s widget or the zombie’s widget? Is this the wave counter we see in the vid?
No technicalities needed.
ShowBloodWindow should show a bloody vignette kind of widget, if the player is below 50% health. It is animated to imitate a pulse (Render opacity is animated for a fade in and out). The animations lasts for about a second, therefore it needs to loop until the player has at least 51% health, then the other Event should stop the loop.
I tried to follow a YouTube tutorial about this whole “game”. As you may noticed I’m pretty new to UE (Create a Zombie First Person Shooter Game | Unreal Engine 5 Beginner Tutorial - YouTube, the explanation by the guy on Youtube what I try to archieve)
Cool. Makes sense - getting a bigger picture now. The tut is 5h+ long so i’m not watching that I’ll grill you instead.
At some point in your script you probably call Create Widget and add it to the viewport. Can we see that? How and when does this widget come to be?
I link should start at the exact moment of the tutorial important for this issue, you really don’t have to watch the whole thing. But if not the time stamp is 4:23:18, from there on 30sec at best and you should have an idea.
I don’t see this widget being created there? Can we see a screenshot of your implementation?
Is this how it’s added?
Or perhaps it’s a widget component? Essentially, I believe you hooked up the widget creation to a Tick event, tick-like event, or a rapidly firing timer.
This widget:
How and when is it added to the viewport?
Here it is, I tried to fade out the cross hair when aiming and implemented this performance tank my self without knowing what it would do!
Aye. That should be on Begin Play instead!
Yeah thanks a lot! I tried for hours redoing all the widgets and watched parts of the tutorial 10 times to check my nodes. I was just not thinking when implementing this hours before and was happy when the cross hair faded out as I intended, so I never considered that this could be broken.
Btw I saw your game and I’ll try it, because this seems actually really well done and enjoyable!
I am just a permanent forum lurking ad banner for that game - stuck with the info I cannot amend since my profile was migrated…
@ClockworkOcean is the maker. And it’s been ages since we heard about a follow up? Is there Zof 2 in the making? Will it have pipes?
Hola!
Yes, was just working on it now. But making a game is a dark and tortured process…
Writer’s block
Making assets
Finding assets
Having puzzle ideas
Having level design ideas
Finding enough pipes!