Closed MyCresta closed 5 months ago
i would really want this for vehicles aswell, getting top speed, accleration, etc, and crazier, setting it, man imagine having realistic gear switching and for wheels, toggleable all wheel drive, air suspension or even hydraulics suspensions
Yes please, I would also add a GetEntityPropertyNames(entity)
to return the list of all existing property names for this entity for fully generic entity scanning capabilities :)
This is getting attention now: https://discord.com/channels/760105076755922996/1176905132068327494/1176905200754233374
This now exists in https://[teardowngame.com/modding/api.html#GetProperty](https://teardowngame.com/modding/api.html#GetProperty) and https://[teardowngame.com/modding/api.html#SetProperty](https://teardowngame.com/modding/api.html#SetProperty) it doesnt make sense for voxbox to return color and material since its not how it works under the hood
Well it does exist but it is still incomplete as in: you still cannot get the damn texture id out of anything to be able to perfectly clone shapes :/
@FlorentP42 #470
@FlorentP42 #470
Well this request is about a dedicated function to get/set textures, not about it's "property" counterpart, but I agree that would solve the issue :)
Is your feature request related to a problem (if not, explain why you think this feature should be added)? Please describe.
This should be added because it would make it easier for modders to spawn new entities with the same properties as entities that already exist on the map.
Describe the solution you'd like
In a similar way that you can now get properties from current enviroment with
GetEnvironmentProperty(name)
It should be possible to get certain properties from an entity with something likeGetEntityProperty(entity, propertyName)
For my case with the flood mod i made i would like the color properties of a water entity so that i can spawn new water with the same color. Also getting other properties of a water entity could be useful for the same reason.
I also see other potential cases where this could be pretty useful. For example getting properties from a voxbox like: color, material, size, texture or getting corresponding properties from a light to spawn new identical entities.
Describe alternatives you've considered
An alternative could be to add specific functions similar to how some properties are accessible like
GetJointLimits()
orGetShapeSize()
however, it would be easier to just get desired property with one functionGetEntityProperty(entity, propertyName)
no matter the type.Most entity properties are currently not possible to read at all like the water entity and there is no alternative to spawn new entities with identical properties.
Additional context
No response