Suggestion Issue: Convenient blocks to get relevant information about the collided tile.


Pages: 1

LIBERADO

  • Expert Stencyler
  • *
March 03, 2017, 10:37:26 am
Currently, we can get only the Data of the collided tile, and this is very limited.
So, I suggest adding these blocks to get other relevant information too:

« Last Edit: March 03, 2017, 10:47:34 am by LIBERADO »


designpeg

  • Subscriber - Stencyl Studio
  • *
March 06, 2017, 04:14:26 am
great idea!


Donni11

  • Subscriber - Stencyl Indie
  • *
July 06, 2017, 07:20:32 am
Really need these blocks as well!


Donni11

  • Subscriber - Stencyl Indie
  • *
July 06, 2017, 07:44:50 am
Apparently this is the reason Stencyl doesn't have these blocks yet:

The problem is that actors don't actually collide with the tiles per se, but instead they collide with a collision shape that Stencyl creates for you at the border of collide-able tiles. As a result, the game doesn't know what tile you collided with - only that you collided with a shape that corresponds to the tilemap.

« Last Edit: July 06, 2017, 07:45:04 am by Donni11 »


LIBERADO

  • Expert Stencyler
  • *
July 06, 2017, 07:59:55 am
@Donni11, I don't think so because if Stencyl is able to get the , this means that Stencyl knows what tile you collided with.
« Last Edit: July 06, 2017, 08:05:17 am by LIBERADO »


Donni11

  • Subscriber - Stencyl Indie
  • *
July 06, 2017, 08:10:09 am
I think that just gets the data from the collision  shape.


LIBERADO

  • Expert Stencyler
  • *
July 06, 2017, 08:13:23 am
No, because when a lot of tiles together are sharing the same collision shape, Stencyl is still able to get the data of each tile.
« Last Edit: July 06, 2017, 08:15:47 am by LIBERADO »


Donni11

  • Subscriber - Stencyl Indie
  • *
July 06, 2017, 08:15:27 am
I never thought about that. Yeah so I guess Stencyl should have these blocks already. Hopefully they come soon.


LIBERADO

  • Expert Stencyler
  • *
July 06, 2017, 08:17:04 am
Yes, let's hope so.


LIBERADO

  • Expert Stencyler
  • *
July 08, 2017, 12:40:35 pm
Also, "column (x) of collided tile" and "row (y) of collided tile" blocks could be added to easily solve this issue: http://community.stencyl.com/index.php/topic,51855.0.html
« Last Edit: July 08, 2017, 12:55:07 pm by LIBERADO »


rob1221

  • Master Stencyler
  • *
March 09, 2019, 12:01:38 pm
Added a new block in b10311 to get the column/row of the collided tile.

No, because when a lot of tiles together are sharing the same collision shape, Stencyl is still able to get the data of each tile.
The first tile found that has collision is used.  If there are multiple tiles with collision in the same location then these blocks will not work as expected.
  • Status changed from New to Resolved
  • Issue Assigned from (none) to rob1221
« Last Edit: March 09, 2019, 12:02:17 pm by rob1221 »


LIBERADO

  • Expert Stencyler
  • *
March 09, 2019, 01:17:12 pm
Ok, thanks.


Rimrook

  • Level 3 Stencyler
March 19, 2019, 07:20:41 am
Sounds like some of this information can be gathered from the Tile API.

For example, one could detect which side was collided for the player, as in top, bottom, left, or right sides, then grab the nearest tile or tiles ID for that. Some rounding might be necessary with tilseizes and shape. I use this to change footstep sounds based on material when my player runs around.
« Last Edit: March 19, 2019, 07:22:03 am by Rimrook »


LIBERADO

  • Expert Stencyler
  • *
March 19, 2019, 07:34:28 am
@Rimrook, we know that sometimes there are workarounds, but the suggestions are to ask for more direct and easy methods.
« Last Edit: March 19, 2019, 07:34:43 am by LIBERADO »


Pages: 1

Details

  • Reported
    March 03, 2017, 10:37:26 am
  • Updated
    May 09, 2019, 02:02:35 am

  • View Status
    Public
  • Type
    Suggestion
  • Status
    Resolved
  • Priority
    Normal
  • Version
    3.4.0 beta5
  • Fixed in
    (none)
  • Assigned to
    rob1221
  • Category
    Design Mode Blocks

Tags