How To Spawn An Object & Score Points With A Static Character

Discussion in 'How Can I...?' started by Phill Mason, Aug 9, 2018.

  1. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    719
    Hi folks, I've been trying to help a fellow Boxer with an issue he's been having, of trying to score points, but with a static character in his game. He also wanted to be able to score approx every second.

    Main issue with this setup is:
    1: The Character doesn't move (so can't collect points).
    2: You can't spawn actions (coins) into your character for scoring.
    3: You can attach an action to an object and make the object move, but if you spawn the object, the action doesn't spawn with it.

    There are other complications with the many variables your game may have, but these are the main issues to overcome. So, I've created a bbdoc and thought it would be good to share it with the community, in the hope that it helps someone out who maybe building a similar game with a static character who needs to score points.

    Please let me know if you found this helpful. If you manage to make a game out of it, I'd love to see it. Good luck.

    Enclosed - BBDoc - "Spawn Object to Score Points".
    Built with Version 2.3.5 but should open okay in 2.3.6
    https://www.dropbox.com/s/1pzihhm36ie0t00/Spawn Object to Score Points by Phill Mason.bbdoc?dl=0
     
  2. stevinz

    stevinz Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    169
    Likes Received:
    142
    Nice work Phill, great job as usual!

    There is another way to do this that has worked for me that may be a little easier in which the object is a decoration. This way you don't have an object on the screen that has the ability to destroy / interact with other game objects.

    You create an object and paste a coin (action) into the object's default animation. Then place the object onto the start scene underneath the main character (no collide, no destroy), link the object to the character (character being the parent), and set the object to spawn. The action will spawn as the object and you will collect the coin / points. You can also give the spawning object a velocity so it's ghost will move off the screen and you don't get a ton of invisible objects piling up into memory.
     
    Phill Mason likes this.
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    719
    Thanks for the alternative tip @stevinz, I haven't tried that method before, I'll give it a go, thanks.
     
  4. Vikas

    Vikas Boxer

    Joined:
    Feb 24, 2019
    Messages:
    99
    Likes Received:
    80
    @phill can you share that file again

    thanks a lot
     
  5. Josh (Nology Games)

    Josh (Nology Games) Head Moderator Staff Member

    Joined:
    Nov 27, 2017
    Messages:
    456
    Likes Received:
    141
    good job! we always love seeing our members helping each other out!
     
  6. Vikas

    Vikas Boxer

    Joined:
    Feb 24, 2019
    Messages:
    99
    Likes Received:
    80
    P
    This File isn't available , could you please post it again thanks !
     

Share This Page