Topic category: User side tutorials
So, you wanna something like this?
you can do without animation too*, that work for chairs for example...
and not like pig with random rotations?
and more!, don't crashes and load with configured rotation!
So, follow me, i will explain how i do that.
Step 1:
Create a global variable, with name Playerfacing, Number, Global_world. 1.0
Step 2:
Create a new procedure, with global trigger "on player tick update"
Set the ifs and else if, if you don't now what is "else if", this is like " else,if", AHAHAHAH
this for example, is the same like the image above, but this will take more from your computer memory, so if you can, do with "else if".
* Example *
This will detect the direction at the player!
Step 3!
Create your entity, and save for now! because you need the name of entity for the next step.
Step 4
Create a procedure with this configs, put name like "Chairspawninworld" or something like this
1- If you don't will use the animations.
2-If you will use Gecko lib animations.
is the same, but you need to put "is provided world remote" because it can crash your map
EDIT# The animation only works in another procedure like this
and i don't know why....
Step 5!
Now.. Save your procedure and put in your entity/Trigger [ on inital entity spawn ]
[ if your procedure name is like "Chairspawninworld", insert here ]
and if you are making a block,chair,or puppet like my gifs, disable the AI.
and tadaaaa!
Extra:
if you wanna to entity copy the direction of block under "like the gif in piston", this is tiny hard because
some blocks don't have direction "like grass" , and can do some bugs. " i mix the procedure with this another one, but that give me a lot of bugs.
if you want it, i will save you time to discover all directions.
Nice tutorial, pinning the topic :)
The animation on your puppets are really good well done.
That's so useful
nice, it helps me a lot during my development
is it possible to do this with blocks? so that each block is randomly rotated
SO USEFUL! Awesome, thanks for posting this, it will help a lot of people.
I got a problem. In 1.20.1 it breaks. the entities change direction to a random one after I rejoin the world.
Any idea how to fix it?