Float Value Increased Because of Time Spent

Hi there I’m trying to increase the value of a float by the time a boolean has been set to true.

I am happy to add more information if needed.

i would like to ask how and when,

is your float increasing with time to a certain amount specified ?

eg:float goes from 5 to 10 in 5 sec (already specified and not changed in game)

time is specified but not the value?

eg: float goes from value A to B in time 5 sec (float is not specified but time is)


float is specified time is not?
eg:float goes from 5 to 10 in time T(float specified, not time)

or all are not specified?

or you want to get the time level has been open for?

boolean can be handled easily but please specify the logic.

The whole idea is that for the more time spent in an area (an actor’s collision) the longer a poisoned effect last for. the float that i want increasing is the delays time.

so the time starts upon entering the collision and what ever time you were in there for is multiplied by 3 to finally control how long you will be poisoned for.

]i hop you can change the bool successfully.and have played with timers and custom events.

player would not stay there forever right?

I feel this would be easier to just have afunction for setting your bool. When the function is called store the current time in a var called currentTime.

Every tick you can just subtract GameTime from currentTime and it will give you the elapsed time. No timers, no fuss.