Hi, I’m adding an instanity feature in to my new game, the idea is that I’ll do it with post processing volume. The way I went about it is; I created a variable Dizzines level that goes down 1,5 evey second and starts from 100. When It reaches less than 30 the post processing gets worse and worse every second, but If the player picks up certain items, it restores that dizzines level for 100, 75 and 50, depending on the item. The issue I get is that when I pickup the item before even reaching less than 30, it already starts the even of making post proccesing worsening. I would like your help, on how I can make it so It will work as for my idea, and maybe some other effects to make the player look like he’s going insane.
Update Dizzines level Event
1st left half of the pic
Your restore dizziness event is setting the amount 1 after the other using that sequence. it all happens in the same trigger.
All a sequence does is allow you to tidy up code and run things in order 0, 1, 2, 3… etc
it will ALL fire in the same trigger just in the order you have set. so you are changeing to 100 then 75 then 50
Suggestion:
remove the sequence and the event
Have your character trigger an event on the pickup
in this event change the amount of insanity (looks like you using 25 per pickup) so each time you pickup up set your dizziness = dizziness - 25
still in the same event do a compare on the dizziness level and change your postprocess accordingly
To make this easier i would do some sort of math calculation inside a function that will set you post process values based on the dizziness so that you only have to “make post process settings” just the once with calculated values.
let me know if you need more clarification, or if im totally wrong, had a long night last night and my eyes are tired!!
okay maybe try this as me making a complete blueprint would be messy as you have a lot going on so let me try and explain the logic a little.
So you have begin and end overlap is a good start.
Create a variable called “dizzinessTimer” of type Timer Handle
Create a function called “SetDizziness” leave it empty for now
Begin overlap have a Set Timer By Function Name, set the function name to “SetDizziness”, and the duration to 1.5 (or however often you want it to worsten)
on the output of that node set you “dizzinessTimer” linked to the output timer handle
End Overlap use a Clear And Invalidate Timer by handle and attach the “dizzinessTimer” as the timer handle (this stops adding more dizziness when outside the volume)
inside your new function “SetDizzeness” use a set node to set your DizzinessLevel variable with an Add node to set by how much.
This then replaces the delay node you have inside an event which is never a good idea.
Still inside this function after the set you just added, do a compare float node
input is DizzinessLevel and the compare value as 30
the only output you need to connect to on this is the < pin to the code that calculates the the postprocess values (connect the == to it also if you want it to start at 30 otherwise it will start at less than 30)
This should now change your dizziness level cleanly
now i have also noticed some of your post process values are a little messed up, you havent set them properly which may be the REAL issue. so if you tell me how much you want to change the values per each dizziness level change. I can probably write you some blueprints to help you clean this up.
Ideally if you can explain in simple in stages what you want to happen i can help a lot more
ie:
enter volume add dizziness x per y seconds
what level of post process per x dizziness
what happens after < 30 is it just stop movement? is there more does the speed increase?
I really appreciate the help here, It’s my first time changing post processing from the blueprints so I got them a bit messed up, I would like the post processing to worsen as the dizziness level gets worse and with that I mean stuff like bloom, chromatic aberration and some other stuff that would make these effect possible so u can suggest me on that as well. I also had an idea that it might shake the camera more and make it more blurry but don’t really know how to do that. And if the player reaches 0 he dies because he went totally insane, from 30 to 1 it just gets worse and worse. I also want to know what should I now delete of my previous code, what to do with the restore option by collecting items and If I’ve been able to replicate what u just said. And I should also mention, I want it to start from 100 the variable so the player’s character isn’t insane just yet.
The SetDizziness function (Ik the post processing is messed up)
FirstPersonCharacter BP event graph (I have not removed any of the previous code yet, because I don’t know how much of it do I need to keep, especially for restore)
ok just a small update snippet for your begin overlap and end overlap you just posted.
Thats the right idea, but you need to check you are overlapping the correct volume and nothing else otherwise it would mess up your code when u overlap another random object.
So i suggest, to make life easier for you, create a new variable in your first person character Bp called , DizzyVolume (call what you like just remember what what you call it)
Set the type of this var to “post process volume” dont set any value as default
Select your post process volume in the world, then in the details set a new tag called dizzy (or similar)
So now we have a way to remember what post process volume we are in and a way to start and stop the timer when we enter or leave. (Dont forget to tick the looping box on the timer!)
Add a new function called SetPostProcessSettings with 1 input called Reset? as boolean
ok test this out then there is a few things more to add i just dont have the time right now, that said have a play if you want to do what ive missed for now. Dont worry if you get stuck , get back to this and i can update you more maybe tomorrow
I’ve removed my previous event for update and restore dizziness. So far I’ve tried a few things and lets just say that I’m even more confused than before. The dizziness value doesn’t change and Item pickups aren’t really functioning. So I understand you have to go and you’ve done more than enough for one day for me If even forever but I do not see myself being able to complete this alone now so I will wait and you take your time, but still much appreciated man.