Add a GetEntityKeyvalue function to VScript #1266
Labels
Type: Enhancement
This is something that improves upon an already existing thing.
What: Scripting
AngelScript or VScript related issues
What would this enhancement be for?
Other
Describe your enhancement suggestion in more detail
As far as I’m aware, there currently isn’t a way to obtain the stored value of an entity kv through VScript.
Adding this would be really useful, as it would not only allow you to add arbitrary kvs to entities for later reference in the script, but would also allow to you obtain a specific value which currently can’t be obtained (e.g. a set mass of a prop_physics).
I imagine the syntax to be smth like this:
<entityhandle>.GetEntityKeyvalue(keyvalue)
In cases where the given kv doesn’t exist, it should simply return
null
.If you need me to expand on this idea anymore then let me know! :D
The text was updated successfully, but these errors were encountered: