Jump to content

Entity tile transformation help?


Recommended Posts

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

 erffreferferefr.PNG.6f8d747745b743bfef62f6b7c866c25a.PNGefrefrferferfre.PNG.cb7e81d2c53503fe68bf404b8068f9a4.PNG

Edited by Goat King
Link to comment
Share on other sites

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 by _zwb
  • Health 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...