How do I clone a Ball with same properties like the Original

  • I have another problem with my Breakout Game.

    I have setup a "Multiball" Powerup. The Ball are split and move when i collect them, but the new Ball does not have the same properties like the original Ball (it will spawn a normal ball)

    Example: I have a Fireball as original Ball -> i collect the "Splitball Powerup", but the new (second) Ball are a Normalball.

    These are my Actions. Do anyone see the False? And how i can limit the maximal Balls on Screen?

  • Make sure your not setting the ball back to original in another event that is overwriting the changes being made here.

    If only one type of ball can exist on screen at a time you could also make a global for each type and set it to 1 (and rest to 0) when that ball is active and then have your spawn only spawn the type set to 1, then reset when it changes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the .AsJSON expression and "set from json" action to copy object state. Ex:

    Global text temp=""

    For each ball

    ---Set temp to ball.AsJSON

    ---ball: spawn ball at image point 0

    ---ball: Set form JSON string temp

  • Thank you - your method work for me.

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