recreating an entity?
I need an easy way to 1) get the 'origin', 'team_no' and 'angles' keys from an entity, save them temporarily, delete the entity, then rebuild it with specific keys?
I have made an attempt of just editing the entity as-is but all of the keys are not applied, so it wont always work as intended :( PHP Code:
heres an example of one of the entities im working with: Code:
{ |
Re: recreating an entity?
You should think about which module you'd use. Using both fakemeta and engine is bad.
like this: PHP Code:
|
Re: recreating an entity?
No, it's not BAD to use both modules if you use the most efficient stuff from them.
And "entity_set_*" sets predefined internal values for entities, he wants to use keyvalues of the entities wich can have any key and any value. To set entity keyvalues with engine you can use: DispatchKeyValue(ent, "key", "value") You also should call DispatchSpawn(ent) after all keys are set. And I think you should use it in plugin_precache() to create an fake "already in map" entity... I used that for info_map_parameters. You could hook entity spawn in precache and alter it's keyvalues... or remove it and remember that then, afterwards create the desired entity... you should use server_print messages to debug your actions. |
Re: recreating an entity?
Quote:
|
| All times are GMT -4. The time now is 07:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.