How do I spawn two new objects and know which is which

0 favourites
  • 7 posts
From the Asset Store
Create your game with this complete pack of images and animations!
  • Hello good people of the construct2 world

    I have just started working with this tool and must say it is great.

    As all beginners i have ran into some problems trying to develop my game

    I have a cloud sprite object that acts like a platform that needs to spawn 2 rain drops

    I have made 15 objects that are called drops1, drops2 ---- drops15

    now i must make it so the cloud spawns drops1 and another dropsX random, the problem is when the player catches the drop I don't know how to make so I can detect witch one he has cached, and if it is the right one (first drops1 then drops2) then make it so the next right drop to catch is lets say drops3

    If the player has not cached the right one he missed or caught for example drops9 then the cloud must spawn again the right drop and one other random

    I am not sure if I have described this right, but I am thankful for any help or insight that you can provide.

    Thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This isn't the way to do this. Use a single object and either use a different frame for each, if they display a number, or give it an instance variable with the number you care about. The frame number or instance variable then tells you which is which.

  • the problem is that all the drops are diferent

    number one is blue, 2 is red and so on

    also is it possible to differentiate between objects based on name lets say drops1 and drops2

  • That is dealt with by using different animation frames for each.

  • RE: "also": no. You'd have to have 15 checks - that's the problem. You'd need to do everything 15 times. You can do it in one.

  • thank you, I will try it and post how successful it was

  • Wow thank you blackhornet, i managed to make it that way, now I just have one object and look for what frame is it

    Thank very much

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