Actor does not collide with tiles, err. It does. But not in every scene.

dripple

  • Posts: 748
Trying to develop a another puzzler. Created a simple level and then developed the behavior with the game logic. Quit simple: select a dragon and then press an arrow key to let the dragon walk into that direction. The dragon moves until he get's stopped either by a wall (tile) or another dragon.

Works so far with one scene. Then I duplicated the scene two times and changed them a little bit. And now the collision with the tiles do not happen any more? Collisions with the dragons do happen, but this is another story. Is there something, that's not copied between scenes I should check?

/confused.dripple

« Last Edit: February 16, 2014, 09:29:22 am by dripple »
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

Hectate

  • *
  • Posts: 4643
Did you use Scene Events and fail to copy them over? If you used behaviors, are they all attached? Were you using layers to determine collisions and when you changed the scene the tiles got put in the wrong layer?
:
:
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.

Photon

  • Posts: 2697
(Psst, your two inline text links reference the same topic...)

Could you show us the code you are using?
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!

dripple

  • Posts: 748
Did you use Scene Events and fail to copy them over? If you used behaviors, are they all attached? Were you using layers to determine collisions and when you changed the scene the tiles got put in the wrong layer?
It's only one behavior, that's attached to each scene and configured (references to the cursor and the up to four dragon targets)

I also thought about different layers and double checked it, but it's the same (yes, I have four layers).
Question: do collisions only happen on the same layer? How do collisions happen? What, when, why?  :-\
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

dripple

  • Posts: 748
(Psst, your two inline text links reference the same topic...)
(Thanks, removed the first reference. Thanks for reminding me.)

Could you show us the code you are using?
It's totally broken yet, as I tried to figure out that collision dizzing-thing in my head. Once I have it up and running, I'll post the "game" here.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

dripple

  • Posts: 748
Funny: the collision with the wall tiles do not happen, but the dragon move over the walls and stop there. The scene itself is bigger, so the dragons do not pass that line? (Second level on my attachment)
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

Hectate

  • *
  • Posts: 4643
Have you run it with Debug Drawing on to see where the walls are drawn?
:
:
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.

Photon

  • Posts: 2697
Since it looks like they are moving on a grid, I wonder if you are using set x/y blocks instead of push/speed blocks...
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!

dripple

  • Posts: 748
Have you run it with Debug Drawing on to see where the walls are drawn?
Well, thanks for the hint (I always forget about the debug drawing). That doesn't solve my problem, but shows what my problem is: where have my inner boundaries gone?

Edit: If I remove the inner wall, it looks even worse. And I get an error, that a reference to an Actor is now null?!

« Last Edit: February 16, 2014, 11:29:44 am by dripple »
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

dripple

  • Posts: 748
Since it looks like they are moving on a grid, I wonder if you are using set x/y blocks instead of push/speed blocks...
For the cursor, I do set x/y blocks. But for the dragons, I use the set-speed to have the animation of the moving dragons.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

Photon

  • Posts: 2697
Have you run it with Debug Drawing on to see where the walls are drawn?
Well, thanks for the hint (I always forget about the debug drawing). That doesn't solve my problem, but shows what my problem is: where have my inner boundaries gone?
I'd be curious to see where lines are drawn if you remove that middle wall.
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!

dripple

  • Posts: 748
I'd be curious to see where lines are drawn if you remove that middle wall.
I attached a picture with the removed wall in the middle, as I as also was curious.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

Photon

  • Posts: 2697
Your floor tiles have a solid collision shape (thus why they are being mulled in with the rest of the tiles.) Are they the same ones you used in the first scene?
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!

dripple

  • Posts: 748
Damn, you're right! The tiles have collision shapes "block". No idea why this works with with the other level?

(I had a large tile set that was split into two, one for the walls and one for the floor. Some floor tiles are in both sets, I used of course the tiles from the wall set)

I changed them back, but now every level stopped working because of a null object reference. I use a actor propery to store the current selected dragon and do have events, that refer to this reference. As the actor is null during startup, it crashes (I assume this is the "no actor, no eventlistener" thingy?)
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

dripple

  • Posts: 748
I changed them back, but now every level stopped working because of a null object reference. I
My fault. During my experiments, I nulled the property that keeped track of the current selected dragon after release.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper