Page 1 of 1

Dropping down from a semisolid block

Posted: Tue May 08, 2018 1:17 pm
by ShadowStarX
So um I've made a little lua code that could be use for many people.
This lets you drop down from a semisolid block or sizable (only works with blocks, haven't done this with NPCs yet)
The code with some explanation: show
Image
Image
On this image, I've circled some of the blocks. The ones that I've circled are the ones that you MUST include in the code (the second for loop) to avoid clipping into it. The reason is that if a solid and a semisolid block are continuations of one and other, dropping down would result in clipping into the solid block.
Also ONLY include the IDs of the semisolid blocks that you use in the level inisde the first for loop and only include the IDs of the blocks that get to be horizontal neighbours of said semisolid blocks. (and if you can stand on the solid block)

In the level, the player would drop down from the semisolid blocks and sizables via pressing the spinjump and down keys.

Download Link of an example

I hope that this code is helpful and that I've provided enough information as help.

Re: Dropping down from a semisolid block

Posted: Tue May 08, 2018 1:20 pm
by ShadowStarX
Oh I forgot to note that you need to copy the content of this lua file into lunadll.lua and you cannot just copy this file into the folder.