Goat King Posted August 19, 2023 Share Posted August 19, 2023 (edited) Hello, hello! Made an account just for this question because apparently I lost access to my old account, so, apologies for the newbie appearance! So, I bring you guys a question! How would I go about making an entity, let's say, a Beefalo, that when they touch a specified tile, they transform into a Varglet, but turn back into a Beefalo when they're off of the tile? I made a crude version of this, but the Beefalo wouldn't change back. So, I made an "else" for the Beefalo so that if it wasn't touching the tile, it'd be a Beefalo, but as expected, any Varglets that would spawn in the world would just turn into a Beefalo. I don't know how to make it "save" its form. I figured it'd be better to start from scratch and ask from help. Any takers? Thanks! Reference images below. <3 Edited August 19, 2023 by Goat King Link to comment Share on other sites More sharing options...
_zwb Posted August 19, 2023 Share Posted August 19, 2023 (edited) You could create a component that does the transformation, add it to the beefalos you want, and when it transforms you just add the component to the varglet spawned (I'd assume you're just deleting the Beefalo and spawning a varglet?) Fuffles's idea is definitely better and easier Edited August 19, 2023 by _zwb 1 Link to comment Share on other sites More sharing options...
Fuffles Posted August 19, 2023 Share Posted August 19, 2023 When a beefalo enters desired tile, transform to a varglet and give it a tag, example "wasbeefalo", if the varg has this tag and is not on the desired tile, convert to a beefalo again 2 Link to comment Share on other sites More sharing options...
Goat King Posted August 19, 2023 Author Share Posted August 19, 2023 5 hours ago, Fuffles said: When a beefalo enters desired tile, transform to a varglet and give it a tag, example "wasbeefalo", if the varg has this tag and is not on the desired tile, convert to a beefalo again Sounds efficient! Thank you for your comment. How would I go about doing this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now