Spawning models (entities)
Alright, I know almost nothing about this.. So here's my choppy code:
[EDIT] Disregard this part, continue to the next part. >> Also what I want to know is.. How do I go by assigning a specific ID for each one of them, and removing them later on (all of them, by their ID's)? |
um... entities? or just random models? I'm going to assume you mean entities, which I also know very little about. But I think you would do it like this.
Code:
Something like that... hope it helps |
Alright, thanks. Now, I know how to give it health, but what about checking it's health?
|
Erm... get_pev of entity?
|
Hrm..
Code:
[EDIT] What would I use to constantly check the health? |
What do you mean "constantly" check the health?
|
I think he wants to assign a health and destroy the ent when its health is <= 0 so wants to know how to check to see if the ent needs to be removed
|
Well, after I shoot it a bunch of times it eventually disappears. I just want to do something WHEN it disappears. (health >= 0)
|
After you create it, change its classname to something unique, and then use register_think to grab its think. Every think see if its health is <= 0, and then do something.
|
Ah yes! So that's what that forward does.. Thanks :).
|
| All times are GMT -4. The time now is 16:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.