block().ipsolid, .inpcsolid and .slopeangle

Description: Have any suggestions or new ideas for SMBX-38A? This is a place for you. Good suggestions may appear in future versions of SMBX-38A.
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 272
Posts: 619
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 15 Sep 2019, 23:17

Sometimes when I work on collisions I find myself in the problem of detecting whether the block is solid or not. I usually make an array containing non-solid blocks (sizables, bridges and slopes) to solve this, but it's not efficient.

That's why I'm suggesting the properties:
block().ipsolid ("is player solid") to detect whether a block is solid for players or not.
block().inpcsolid ("is npc solid") that would do the same as ipsolid but with npcs.

Additionally, I'd like to suggest:
block().slopeangle to detect whether a block is a slope or not, and if it's, check its angle.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

NESTED ERNEST M
Duke
Duke
Avatar
NESTED ERNEST M
Duke
Duke
Reputation: 14
Posts: 133
Joined: 23 Sep 2017
Location: Perú, Lima
Website

Post #2by NESTED ERNEST » 20 Sep 2019, 20:06

Thinking about those two new properties that you suggest, that instead of detecting only that if it is solid or not (because this is very particular) it would be better for each property to obtain the index value of the selected item from the game list object editor,
Image

So you could program an npc who decided to jump that above there is a block that you can only go up, I guess this image is better than my explanation.
Image

With this you can also know that the block is a slope.
Programming NPCs in SMBX-38A is fun:

ROCKMAN GIF IN SMBX 38A

Image

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 272
Posts: 619
Joined: 9 Nov 2015
Website

Post #3by Lx Xzit » 21 Sep 2019, 7:18

That's pretty clever! Definitely much better than my original idea. In that case I'd like suggest the properties .pcollision and .npc collision
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image


Return to “Ideas & Suggestions”

Who is online (over the past 5 minutes)

Users browsing this forum: 4 guests