How can I change the KeyValues of an already spawned entity. What I know is, I've never seen or tried this is the actual Source SDK Hammer Editor. Not sure if it is possible doing it with a script.
But how can I do it with SourceMod?
Let's take this as an example: https://forums.alliedmods.net/showthread.php?t=288850
new gunfire = CreateEntityByName("env_gunfire");
DispatchKeyValue(gunfire, "spread", "1");
So now the gunfire entity is spawned.
Let's say I want to change the spread again. How can I do that? So what I know is I wouldn't be able to access the entity anymore by using the gunfire
variable. I would need to get the entity first.
But if I get the entity, how can I change the KeyValues then?