Events With Tiles [Solved]

Donni11

  • *
  • Posts: 2181
Hello,

This is the code/event I'm trying to write:

If Box (actor) kills a Tile( an actual tile, not the actor group);
Add Tile ID ( of the killed tile)  to Tile Deleted ( Number Game Attribute),

I've been trying a while already with no success. Any screenshots would be appreciated.

« Last Edit: July 06, 2017, 09:09:19 am by Donni11 »
Peace

JeffreyDriver

  • Posts: 2262
What happens? Have you tried adding it to a text attribute and printing it to screen just to check its output?

Donni11

  • *
  • Posts: 2181
No, I don't even know where to start. Can't find the right blocks to do the job. I need a screenshot of how to do it.
Peace

Donni11

  • *
  • Posts: 2181
Peace

LIBERADO

  • *
  • Posts: 2718
To solve these kinds of issues, I made this suggestion: http://community.stencyl.com/index.php?issue=749.0
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Donni11

  • *
  • Posts: 2181
@LIBERADO, Do you know how to program with Haxe?
Peace

LIBERADO

  • *
  • Posts: 2718
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Donni11

  • *
  • Posts: 2181
Oh, anyway great language. You should learn it. Think about all the great Stencyl extensions you could write. Your always suggestion new and great innovative ideas to the Stencyl platform. If you are writing and coding in Haxe it would do great for Stencyl community. Just saying ;). I myself also plan to try at Haxe someday, but right now I have to master the Stencyl engine.
Peace

Donni11

  • *
  • Posts: 2181
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.

Peace

LIBERADO

  • *
  • Posts: 2718
About learning Haxe, despite I will always use code blocks, I would like to learn Haxe as well, but trying to learn it is very frustrating because, unlike other programming languages, the documentation that I find about Haxe on Internet seems very scant and confusing. I have never found a guide that was clear enough to learn Haxe from scratch.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

LIBERADO

  • *
  • Posts: 2718
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.
I don't think so because if Stencyl is able to get the , this means that Stencyl knows what tile you collided with.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.


LIBERADO

  • *
  • Posts: 2718
Maybe I will buy some Haxe book too.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

LIBERADO

  • *
  • Posts: 2718
A workaround to solve your issue: in the Tileset editor, type the ID of each tile in its Tile Data field, then you can get it later at runtime by using the  block when your actor collides with any tile.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Donni11

  • *
  • Posts: 2181
Thanks for the tip! I'll try that.
Peace