[Help Request] Creating and firing off states

THIS IS A REPOST DUE TO DATA LOSS YESTERDAY

I figure there are many ways to accomplish any one task and that some are more desirable than others but I am actually stumped on my project.

I created a state - think of it in terms of GTA / this is nothing like it but it is a reference more people are familiar with - The state will be wanted. As you play the game you have a meter behind the scenes and certain actions you do cause it to fill up. When the meter hits 100% you are “Wanted”. So here are my goals:

  1. When meter it hits 100% and freezes
  2. A second state (Alarm) turns on. This will be like putting starts up on screen and playing audio like you are being chased.
  3. When I find an object to hide in ( I will use a volume for the time being) the meter resets to zero and the Alarm state also resets.

So at this time I am able to fill the meter. I have a bool check that states that at 100% I am wanted. I am able to reset it to 0% when I enter the volume.

The problem is this, if I use a set function on the wanted bool and I check every tick then it gets stuck in the wanted state. If I enter the volume it is not resetting.

This may be too complex or outside the scope for a forum request and my blueprint at the present time is huge and fairly messy but if there is specific questions that make this easier to answer, please ask and I will get the resources together to help. This seems to be a simple problem that I am over complicating and until last night I thought I had it working and all of a sudden it is not.

Any help is greatly appreciated!

&stc=1

In the first image you can see that if awareness is 100% then the player is considered spotted and then the true in the branch sets a screen message. If it is false in the branch then normal logic continues. This is being checked every tick as it is important to be timing critical.

Step2.png&stc=1

In the second image if the player hides (in the volume) it resets the logic but for some reason this is not working. The “Detected” message continues and never resets. I need to find an efficient way to reset bIsSpotted.

I did respond to that thread but it was lost also, this response I don’t think is as good as my previous.

What I would do is create a variable in your character blueprint that keeps track of the wanted value. Create a custom event in the character blueprint that changes the wanted value by a specified amount. Then when ever you have something or some actor that causes the wanted value to change you simply call the characters wanted event.

The character checks the wanted value in it’s event and when it hits 100% you set the spotted value to true. If that value is true then create or turn on that “alarm”, if it’s false turn it off or destroy it.

When you enter that volume where you want to set it to zero, call that same character wanted event, but this time decrease the value to 0.

:confused: are you problem?

Why if I put Awarness to zero IsSpotted dont change to false. Look a bit rare. before the put a zero Awarness you can also set IsSpotted to false. You can put a print to look the value of Awarness when do it the reset.