Do created objects have separate behaviors?

0 favourites
  • 8 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I have two platforms that will generate offscreen. The platforms will move to the left to give the illusion that the character is moving right.

    My problem: when the new platforms generate, they don't follow the same rules as the platforms that start on screen. The ones that start on screen are platform one and platform two. The ones generated off screen are these same platforms.

    On jump, the platforms move at a set speed. On collision, all platforms stop moving. This works for the first few jumps but as the new objects are generated, they don't stop moving on collision. And unfortunately, it's only *some* of the time they will stop moving. Sometimes they move, sometimes they don't. What gives?

    The created objects are either platform one or platform two.

  • I was having an issue of the player double tapping the keys when only one key press is allowed per jump. So, I added more conditions: the cat can't be moving, platform one and two can not be moving either. So in order for the cat to jump, nothing in the game should be moving. These platforms are destroyed once they are off the canvas.

    With that said, the moving platforms that don't stop when the character collides with a platform will eventually move off screen. They should be destroyed after this; however, I can't move the character so it must still be moving. It seems like the behaviors for the original sprites don't go to created duplicates..

    P.S. I originally had it so when that it had to be true that the character was NOT moving for the any action to happen with the key. For some reason, that didn't work until I added the conditions for the platforms, too.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • LanieCoder

    https://

    drive.google.com/open?id=0B1SSuCVV8v74cU5Ici1rNEp1YkU

    Just to let you know that i had fun playing with your concept.

  • Thank you for the help, 99Instances2Go. And thank you for the compliment! means a lot for my first game. Can't wait until I get more stuff into it.

  • 99Instances2Go, i just had a peak at the edits! Thank you!

  • ysvw

    I wanted to give you a simple example, then i got stuck on the rules that dictate when the player dies.

    Only those rules make it a bit complicated. I choosed for: wrong key = natural looking dead.

  • lol 99Instances2Go, I looked at the event sheet and your coding is much more intricate than mine. I will have to dial back some. ALso,, since I posted this, I've changed a lot of things but thank you!! i'm keeping it for future reference.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)