How to make a quicksand [Tutorial]

Started by Fegamer on Tue, 07/06/2021 - 00:58

Topic category: User side tutorials

Last seen on 15:16, 15. Jul 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make a quicksand [Tutorial]
Tue, 07/06/2021 - 01:00 (edited)

Today i was trying to make a quicksand for my mod, and like a normal person, i searched on internet to see if had some post about that, that could help me, and i didn't find anything. 
So, after some tests, i finally reached a way to make a quicksand, that only suffocates you if you is submerged, because this was a problem on other topics that try to help making a quicksand. My procedure is not perfect, but works very well. So let's start the tutorial.

It's very simple, first of all create your block and check the box "can walk through the block?" in properties. 
 

After that, all we need to do is make a procedure in the trigger "when entity collides in the block". Just copy this procedure from the image.

https://ibb.co/Mnp85XK

Basically what this procedure makes is, when the block quicksand is y+1 of the player and the player is touching the ground, then he takes damage. It is necessary because if your quicksand have only two of height, you will only take damage if you are submerged, because you will need to be touching the ground and have the quicksand above you.
But, how quicksand can have more than 2 blocks of height, then we will need to do just one more thing, that is, making you take damage if the quicksand is y+2 of the player.
Like that, the player will start take damage after his feet touch the 3rd block bellow him, that also makes him only take damage if he was submerged.
the "set event/target entity in cobweb for one tick", that can be found in "entity management" make your block act like a cobweb for entities.

For me i needed to make every arthropod creature don't interact with the block, that is the first part of the procedure, because they were crashing my game when this type of entity were on the block. 

I don't know if all of you understood how it works, but i hope yes, I'm learning english yet, so, if i made some mistake, sorry about that.

Edited by Fegamer on Tue, 07/06/2021 - 01:00
Last seen on 15:42, 22. Sep 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Remember to put a procedure…
Tue, 07/20/2021 - 14:33

Remember to put a procedure that deactivates this for spiders.
Although it may seem strange that a spider drowns faster than the rest, the "set in cobweb" procedure has a bug for spiders that crashes when activated on spiders. I discovered this in spite of myself while testing a block and lost the test world.