Endless Coin Block (template)

Discussion in 'Buildbox General Discussion' started by AaroArts, Feb 6, 2018.

  1. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Hello.
    Quite often people ask if you can create an endless version of a Mario style coin block in BB.
    So I thought I'd try and figure it out and I think I made a decent solution.

    Check out the video:


    Basically, you have an Object that uses an Advance Move to generate a Action (Coin) upon a collision with your Character.
    Then you use a Spawner on that Object so it spawns every 0.2 seconds, at a velocity of 10 in the X direction.
    Then you place a Transformation to the right of the Spawner to relocate the spawned Objects out of the Scene (-1000,-1000). (This is just so you don't pick up the Points that are spawned elsewhere in the Level).
    Then simply make the Object invisible and place an image over the top of the Spawner to make it look like a Coin Block is in it's place.

    I think it's a pretty neat solution and works 99% of the time.

    Please let me know if you come up with any other ways to do this.
     
    Last edited: Feb 6, 2018
  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Can't you just add a coin to the advanced move of the coin block (or it's invisible part in case you just want to have the effect if you jump up from the bottom)? Advanced move would be without any limit as well. And if you want limit, then use take damage animation instead...
     
  3. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    When I put the Coin in the Advance Move, you can only redeem it once I think... Unless I did it wrong.
     
  4. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    You are right, maybe a bug. But you can get around it by spawning the coin instead within an object... but I guess this is very similar to your own setup (sorry haven't taken a look at it). I attached my bbdoc for reference. The way I set it up it should work 100% though.

    As a side note and for the Buildbox team:
    The attached bbdoc shows a current bug and I hope @Andy or @ZackGriset can pick this up for a fix:
    The sfx from the advanced move doesn't sound always if you collide continuously and fast enough into the object. You have to make a certain pause until it sounds again. This bug is similar to my other reported bugs related to the 'Take Damage Sound'. Results that it affects as well the Advanced Moves...
     

    Attached Files:

    AaroArts likes this.
  5. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Ok, yours is a way better example than mine ;)
    Great solution.

    I've also seen this sound bug too.
     
    Christoph likes this.
  6. ZackGriset

    ZackGriset Avid Boxer

    Joined:
    Oct 3, 2017
    Messages:
    252
    Likes Received:
    354
    Thanks Christoph. I'll discuss this with Andy and make sure this gets passed along to the dev team!
     
  7. PlayShaft

    PlayShaft Boxer

    Joined:
    Jul 5, 2017
    Messages:
    80
    Likes Received:
    44
    @AaroArts perhaps you have a bbdox? I can not achieve this effect. :(
     
  8. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Download @Christoph ’s example above.
    It’s much cleaner than my solution and works 100% of the time.
    You’ll learn a lot about how to take advantage of advance moves etc if you take a look at his :)
     
    Christoph likes this.
  9. PlayShaft

    PlayShaft Boxer

    Joined:
    Jul 5, 2017
    Messages:
    80
    Likes Received:
    44
    well thank you! :)
     
  10. AppNasty

    AppNasty Miniboss Boxer

    Joined:
    Apr 14, 2016
    Messages:
    1,485
    Likes Received:
    890
    I ont get it @Christoph , In your bbdoc, you have a COIN in actions but it isnt placed ANYWHERE. How in the world is the player collecting a coin if the coin isnt in the scene nor is it in an object? In advanced Move of the block you just have another block object, an invisible OBJECT called coin holder and a coin OBJECT. again, none would ever give you a coin. So how in the hello kitty is the player collecting a coin!? lol
     
  11. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Magic !
     
    AaroArts and AppNasty like this.
  12. AppNasty

    AppNasty Miniboss Boxer

    Joined:
    Apr 14, 2016
    Messages:
    1,485
    Likes Received:
    890
    lol it would seem so. I am trying to implement this into another game type and have copied all functions over, yet it doesn't work. I'm missing something....
     
  13. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Take a look at the object that's called Coin Holder. It's called like that because it holds the coin. :D Which then can be added as a spawner. Very neat trick and useful for a lot of things.
     
    AaroArts and AppNasty like this.
  14. AppNasty

    AppNasty Miniboss Boxer

    Joined:
    Apr 14, 2016
    Messages:
    1,485
    Likes Received:
    890
    thats what confuses me lol. You cant place an action inside an object.......right?
     
  15. AppNasty

    AppNasty Miniboss Boxer

    Joined:
    Apr 14, 2016
    Messages:
    1,485
    Likes Received:
    890
    Oh my damn...you can...nm....got it. THANKS!
     
  16. Rebel Studios

    Rebel Studios Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    466
    Likes Received:
    280
    WOW!!! Crazy hacks! Love it :)
     
    AppNasty likes this.

Share This Page