Check if entity exists?
Check if entity exists?
Is there a way to check if an entity still exists without using EntityIter()?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Any, but in my case I'm looking for hl2mp_ragdoll. I'm looking to do some delayed stuff on it, means I'm using the BaseEntity instance of a ragdoll and want to do stuff with it later. Problem is, if it's already removed, the server crashes.
Is there something similar to BaseEntity.exists or do I have to loop through EntityIter()?
Is there something similar to BaseEntity.exists or do I have to loop through EntityIter()?
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Syntax: Select all
if <BaseEntity>.is_free():
# Entity is no longer valid...
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 130 guests