Disappearing Platforms

WaitWhut

  • Posts: 2
Hello!

So, I started making my first game (a platformer) a few weeks ago, and I'm in the middle of getting all my systems in place. However, there is one I am having problems with.

When the player collides with a particular platform, I intend to have a platform fade out over a few seconds and then disappear, dropping the player off of it. The platform will then respawn 3 seconds later for the player to try again.

However, as it stands, whenever I collide with a platform (which is an actor) ALL of the platforms disappear. Not only that, I can't for the life of me figure out how to draw these platforms back after I've killed them.

Any help would be greatly appreciated, as I've been on this problem for about a week now and I can't for the life of me figure out how to do it.

Jersmall

  • Posts: 30
whats happening is you are giving out the command to change for every actor named "dissapearing platform". . since they are all called the same as they are the same actors they all react the same as well.

one way to fix is to create a separate actor for each plat form in that screen so they all have their own orders. Also you set a kill order = deletes the actor from the screen..


give each platform an idle image and a blinking image, then set a unique group for each platform and repeat the code nellow for each platform group. (ex: create platform group 1-2-3-4-5)

again as soon as the animation switches to blinking its group no longer colides with players or actor and thus gives you're desires look.

« Last Edit: July 27, 2014, 11:06:56 am by Jersmall »
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

Jersmall

  • Posts: 30
oh yeah and for the blink, select the actor platform then go in its behaviors and eye candy tab use the blink on collisions.
also consider adding a "do after x seconds" to the first switch on collision so you have a second or two to jump before it no longer supports the player.

thats all you need really.
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

WaitWhut

  • Posts: 2
Thank you so much.  Finally got it working  :D

LIBERADO

  • *
  • Posts: 2716
whenever I collide with a platform (which is an actor) ALL of the platforms disappear

If you do this, it will disappear only the collided platform (not all):
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Photon

  • Posts: 2693
whenever I collide with a platform (which is an actor) ALL of the platforms disappear

If you do this, it will disappear only the collided platform (not all):
That's still not quite right, since you're still telling every platform to issue a separate fadeout/fadein sequence to the single platform.

The only thing that needed to be changed was to make that event listener a "when self is hit by player," where self is the disappearing platform the behavior is attached to. Then each platform can do its own thing.
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!

Jersmall

  • Posts: 30
thx for any better option as i am still a beginner.
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

LIBERADO

  • *
  • Posts: 2716
That's still not quite right, since you're still telling every platform to issue a separate fadeout/fadein sequence to the single platform.
Yes. My example works, but I think it is only appropriate to attach it to the scene, not to each platform.

I also would prefer to use a "when self is hit by player".  ;)
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Jersmall

  • Posts: 30
Thank you so much.  Finally got it working  :D

looks good and no problem!
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

Jersmall

  • Posts: 30
whenever I collide with a platform (which is an actor) ALL of the platforms disappear

If you do this, it will disappear only the collided platform (not all):
That's still not quite right, since you're still telling every platform to issue a separate fadeout/fadein sequence to the single platform.

The only thing that needed to be changed was to make that event listener a "when self is hit by player," where self is the disappearing platform the behavior is attached to. Then each platform can do its own thing.

thx
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

LIBERADO

  • *
  • Posts: 2716
No matter if the consultant is already satisfied. Each person brings their own ideas. It is always possible to learn something new.

Photon's suggestion is very useful to avoid unnecessary extra work in the behaviors.

Thanks, Photon.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Jersmall

  • Posts: 30
thanks to you too librato, always nice to see new points of view.
LEARN PROFESSIONAL PHOTO EDITING, CLICK HERE

Photon

  • Posts: 2693
That's still not quite right, since you're still telling every platform to issue a separate fadeout/fadein sequence to the single platform.
Yes. My example works, but I think it is only appropriate to attach it to the scene, not to each platform.
Oh yeah. If attaching to the scene, that makes more sense.
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!