[L4D2] Target Entity With Hammer ID
Hello Everyone
May I know Why This Doesn't Work PHP Code:
|
Re: [L4D2] Target Entity With Hammer ID
Wild guess is, you lose hook when you spawn, so OnMapStart is too early (I guess).
You can confirm by making "test" console command to execute FindByClassTargetHammedID() manually. - So spawn on map, use test command and look can you get hook callback working. *would it be easier to you use HookEntityOutput on OnPluginStart ? Another guess could be "OnOpen", maybe it is not fired, don't know. here some outputs of that door https://raw.githubusercontent.com/am...nameoutputs.kv Code:
"outputs" |
Re: [L4D2] Target Entity With Hammer ID
Yeah too early, better do OnEntityCreated+SpawnPost (if you need it ASAP) and/or in lateload call.
Also hammerid is a integer AFAIK PHP Code:
|
Re: [L4D2] Target Entity With Hammer ID
...L4D2 have also events like
round_start round_freeze_end if want try use hook single entity |
Re: [L4D2] Target Entity With Hammer ID
PHP Code:
|
Re: [L4D2] Target Entity With Hammer ID
it won't work always,
OnMapStart may run before the entity is created. If you load the plugin mid-game it will work but if you start the map from zero it may fail sometimes. do some tests. The safe way is to do as I said, never had issues |
Re: [L4D2] Target Entity With Hammer ID
I will use it for different entity, with round start, I will also create timer for it
thank you Marttt and Bacardi |
| All times are GMT -4. The time now is 01:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.