Page 1 of 1

HL2DM: Strider resolver

Posted: Fri Jan 12, 2024 1:08 am
by daren adler
HL2DM: new_[exile]_pet_vet_map

I have this map that has strider spawn in and respawn after death. The trouble i am having is that after death of the strider, the model stays on the map, so after a while they are a bunch on the ground, Is there a script/plugin that will make them dead body's go away after their death ?. Stay cool all and have a great day/night. I have a plugin that makes the npcs i use go away - viewtopic.php?f=37&t=2378 but does not seem to remove the strider that is built in the map.

Re: HL2DM: Strider resolver

Posted: Fri Jan 12, 2024 1:48 pm
by cssbestrpg
Try this one (Untested)

Syntax: Select all

from entities.entity import Entity
from events import Event

@Event('entity_killed')
def entity_killed(args):
try:
entity = Entity(args['entindex_killed'])
except ValueError:
return
classname = entity.classname
if not classname == 'npc_strider':
return
entity.remove()

Re: HL2DM: Strider resolver

Posted: Fri Jan 12, 2024 3:18 pm
by daren adler
some reason it did not work, but shows no errors. thank you for trying my friend. here is the vmf it that helps. https://www.dropbox.com/scl/fi/7nmz9czy ... 3f8e1&dl=0
i knnow i am using this in my sourcepython named little silent hill viewtopic.php?f=37&t=2350 it uses

Code: Select all

    def dissolve(self):
        """Removes the ragdoll of the NPC."""
        dissolver = Entity.find_or_create('env_entity_dissolver')
        dissolver.dissolve_type = 0
        dissolver.dissolve(self.target_name)


But it does not remove the strider for some reason. I updated my source-python also and no luck.

Re: HL2DM: Strider resolver

Posted: Wed Jan 17, 2024 9:38 am
by cssbestrpg
Try this one instead:

Syntax: Select all

from listeners.tick import Repeat
from filters.entities import EntityIter

strider = EntityIter('npc_strider')

delay = 1.0

def load():
check_dead_strider.start(delay)

def unload():
check_dead_strider.stop()

@Repeat
def check_dead_strider():
for entity in strider:
if entity.health < 1:
entity.remove()