Cloning Help

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • How do I make it to where when objects get destroyed the objects get cloned 4 seconds later in their original positions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can store the x,y co-ords in a global variable, then say object 'on destroyed' wait 4 seconds and create object at stored co-ords. If there are many objects then maybe setting invisible then visible on a timer would be more useful.

  • Or instead of destroying you can make the object invisible and disable its collision. After 4 seconds - make visible again and enable collisions.

  • For situations like this, I like to use an invisible helper sprite, a "spawner" that stays in the original position and keeps track of values like timing and position.

    The objects created from the spawner can have an instance variable "origin" or "source" that I like to set with the UID of the spawner on created, so that each instance knows where it was created from, and I can use that to pick the correct spawner when the object gets destroyed. This helps in situations where you might have to work with multiple spawner objects.

  • Or instead of destroying you can make the object invisible and disable its collision. After 4 seconds - make visible again and enable collisions.

    Thank you so much! Good outside of the box thinking! I'm still new to this.

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