[Request] Ability to stop SimpleEntities from picking a random variation on build
Posted: Wed Aug 14, 2019 9:30 pm
SimpleEntityWithOwner and SimpleEntityWithForce (and I'm assuming SimpleEntity as well) can have pictures or animations defined which are a stack of variations that are accessible to runtime scripting. This is extremely Nice To Have.
When a player selects an item from their inventory that builds a SEWO, the green/red tinted entity floating with their cursor is always variation index 1. When the entity is placed, however, the game suddenly picks randomly out of the pile of variations available.
This is not the case when the very same entities are revived from a ghost. If you ghost-build using an item from your inventory, the ghost entity always has variation 1 and the bots will always build variation 1. If the ghost came from a blueprint with some other pre-set variation, the bot faithfully builds that variation. The same is true if a player revives a ghost.
It's just players building them within reach that behaves completely randomly for some reason.
Scripting this away is surprisingly difficult. You'd think you could just listen for the 5 types of entity build event and set the graphics variation to 1 or to whatever you need it to be. But because you don't want to screw up ghost and blueprint building, and there aren't any/many good ways for you to detect whether that is what's happening, you always end up breaking something else.
Request: a flag in the SimpleEntity prototype and both of its inheritors, something along the lines of don't_pick_random_variations_out_of_a_hat_on_free_build or whatever a better name for it is. This would default to false for backwards compatibility.
It's even been suggested to me that this is a bug - but from memory, it's been this way forever - Earendel's Text Plates use SEWFs and you've always gotten random lettering if you spam them without using the provided gui.
When a player selects an item from their inventory that builds a SEWO, the green/red tinted entity floating with their cursor is always variation index 1. When the entity is placed, however, the game suddenly picks randomly out of the pile of variations available.
This is not the case when the very same entities are revived from a ghost. If you ghost-build using an item from your inventory, the ghost entity always has variation 1 and the bots will always build variation 1. If the ghost came from a blueprint with some other pre-set variation, the bot faithfully builds that variation. The same is true if a player revives a ghost.
It's just players building them within reach that behaves completely randomly for some reason.
Scripting this away is surprisingly difficult. You'd think you could just listen for the 5 types of entity build event and set the graphics variation to 1 or to whatever you need it to be. But because you don't want to screw up ghost and blueprint building, and there aren't any/many good ways for you to detect whether that is what's happening, you always end up breaking something else.
Request: a flag in the SimpleEntity prototype and both of its inheritors, something along the lines of don't_pick_random_variations_out_of_a_hat_on_free_build or whatever a better name for it is. This would default to false for backwards compatibility.
It's even been suggested to me that this is a bug - but from memory, it's been this way forever - Earendel's Text Plates use SEWFs and you've always gotten random lettering if you spam them without using the provided gui.