An entity that counts the number of monster deaths Created 2 weeks ago2021-07-12 13:53:47 UTC by Alexis_of_Steel Alexis_of_Steel

Created 2 weeks ago2021-07-12 13:53:47 UTC by Alexis_of_Steel Alexis_of_Steel

Posted 2 weeks ago2021-07-12 13:53:47 UTC Post #345766
A call to the Lords of Coding: :^_^:

I want to create an entity that can count the number of monsters that died on a map (monsters that the player has killed or that have been killed by the environment/another NPC). Its name would be env_counter.

It is not necessary to distinguish which monsters died (monster_headcrab, monster_alien_slave, monster_osprey, etc.). This entity must also be able to count the deaths of monsters that have been generated by the monstermaker entity.

It is, so far, the most ambitious plan that I have proposed in terms of Half-Life programming. :P

I was wondering if you can give me a hand in guiding me on how to create such an entity.

I want it to be an entity that shows a text on the screen indicating the number of dead monsters (as can be achieved achieved by env_message entity). :)
Posted 2 weeks ago2021-07-12 15:52:19 UTC Post #345767
Just in case the Lords of Coding don't check the site, you might want to ask in the #programming-help channel on the Discord server, linked in the header. :D
UrbaNebula UrbaNebulaGoldSourcerer
Posted 2 weeks ago2021-07-12 16:13:56 UTC Post #345768
Hey UrbaNebula! Thanks!! :hecu:
Posted 1 week ago2021-07-20 07:33:32 UTC Post #345789
I think it already exists. :/ but I don´t know if it is what you want, it seem to do what you need.

trigger_counter, is a brush based entity, If Quark is not lying me...

There´s also a point_entity with the same name, but I have never ba able to know how they work. I tried once, but with no success.
trigger_counter location :)trigger_counter location :)
Posted 5 days ago2021-07-22 16:21:44 UTC Post #345796
Hi, abbadon! Thanks for the tip, I never used that brush-based entity (trigger_counter), I always used the point-based entity I think you were referring to (game_counter). I will try the entity you suggest! Thank you for your time in responding. :hecu:
Posted 5 days ago2021-07-22 20:37:13 UTC Post #345797
Is trigger_counter even a thing? I've never seen it in the fgd, and even then I doubt it's anything more than just a castrated game_counter variant.

abbadon's picture shows two trigger_counters: one point-, one brush-based. Hasn't HL always had the game_counter point entity instead? trigger_counter is a Quake 1 entity AFAIK.
Posted 4 days ago2021-07-24 03:43:44 UTC Post #345799
Trigger_counter is a thing in HL1 and CZDS, point entity AFAIK. Just use game_counter point entity, works better and is less prone to failure according to Solokiller.
I have a plan I have a planDeleted Scenes is the best CS!
You must be logged in to post a response.