How do I make multi-tier (combined) objects

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.
  • Hello, all. I have been using containers for simple tasks, but the question is - can they successfully be used for more complex combined objects, let's say, something like this (a classis shmup example):

    We have our large base image and multiple objects of the same type attached to it, which function independently:

    And then have the ability to independently destroy those objects too:

    What would be the best way to achieve this? And, preferably, with multiple "depths" i.e. A huge plane with several turrets in wings where the turrets can be shot off, then the wing itself, but the rest keeps going.

  • You couls use the Pin behavior. I believe its more flexible for this kind of stuff.

    https://www.scirra.com/manual/99/pin

  • That sounds like exactly what I need! It also sounds like that only works at runtime so larger objects would need to be fully designed, then image points placed or coordinates put down and then the sub-objects added.

    Still, it has the most important functionality. Thanks for the tip!

  • Just did some testing, will have to see how it pans out with multiple objects, but so far so good:

    Thanks again brunopalermo !

  • Yes... This runtime limitation sucks, but you may use a function to create the objects and attach the parts, like in the example below:

    [attachment=0:1jbny6xr][/attachment:1jbny6xr]

    Sorry about the sprites, I just draw some stuff quickly in Construct itself. :p

    Nice sprites, by the way... Did you made those yourself?

  • Awesome example, "loopindex" is going to help me A LOT.

    Was planning to make dummy objects on a layout that spawn enemies in different ways - this function example is great, because I can make the dummy object call a function when it enters screen (or close to it) and give its private variables as function variables.

    Why do you "floor" the random angle, btw? Just so it isn't a float?

    [quote:3nwem2v8]Nice sprites, by the way... Did you made those yourself?

    Yup, everything is self-made there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep. I was using the debug text object to check the angles and the floats were too long to show, it was a mess. I used a random value just for the example.

    Regarding the sprites, great work. I, myself, am just a game designer, no artist, so I can't make this kind of stuff and I depend on artists to get my assets done.

    Glad to help. Let me know if you need anything else.

  • [quote:28ba0t16]Glad to help. Let me know if you need anything else.

    Now that's service! Seriously, though, if I ever actually get further with the project, there are many things I suck at (like anything net-related (ads, etc), optimizations, etc). Might be something to cooperate on and split the rewards (hohoho).

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