View Single Post
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-06-2021 , 13:26   Re: [L4D2] Offset to get duration of the "insect_swarm" entity
Reply With Quote #3

Quote:
Originally Posted by BHaType View Post
CInsectSwarm inherits from the CInferno class that stores the creation timestamp

Elapsed time = GetGameTime() - stored timestamp
Remaining time before insect_swarm will be killed = CInsectSwarm::GetFlameLifetime() - Elapsed time

You can also calculate the time manually without using offsets

Below are two ways to get the remaining time
Spoiler
This is just what I needed. Thank you so much!
cravenge is offline