different behaviors for different tile sets?

noahkaczor

  • Posts: 11
Is it possible for an actor to have a behavior that only occurs for a certain tile set?
if so, how?

Here's more details on my dilemma:
In the game I am developing, if the blue animation for the player actor is playing, I want it to be able to move through blue tiles and be stopped by red tiles.
If the red animation is playing, I want the actor to be stopped by blue tiles but move through red tiles.

To better understand, the in-development project is here: http://www.stencyl.com/game/play/11298

rob1221

  • *
  • Posts: 9473
You should probably use actors for that.  There is a tile API but even with that I'm not sure you can have different collision groups for tiles.

Hectate

  • *
  • Posts: 4643
Yes, unfortunately it is not currently possible to have multiple tile collision groups.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

noahkaczor

  • Posts: 11
You should probably use actors for that.  There is a tile API but even with that I'm not sure you can have different collision groups for tiles.

Any Ideas for how to get the behavior to work using actors? I can't figure out how to make actors turn collision bounds on/off depending on the animation of the player actor...

rob1221

  • *
  • Posts: 9473
You can have different collision shapes with each animation, and you can set up the collision groups so that only the blue animation collides with the red actor, etc.

double3

  • Posts: 131
This post is 3+ years old ... but I'm also looking for something similar. Hoped it would've been addressed in Stencyl by now ... but I can't figure out how to do it. Here's my situation ...

I'd like my actor to generate different particles (color, size, shape) depending on which tileset it collides with. I was hoping I could assign each tileset to a unique tile group to get this effect. Like this ... actor hits blue tile(s) and blue sparks create, fly and disappear. But if the same actor hits a red tile (from a different tileset) ... red sparks create, fly and disappear.

Is this possible? If not with tilesets, maybe with a different method?

Thanks!

Photon

  • Posts: 2691
If collisions aren't an issue, then perhaps you can use tile metadata. When use hit said tile, grab it, check its metadata (color = red, blue, etc.) and react accordingly.
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

double3

  • Posts: 131
Thanks, Photon. But that won't work.

I have it working now ... but had to go with an actor that looks like tiles to get what I want. Sucks. But at least it works.