Reward Coins/points For Killing Enemies [bbdoc]

Discussion in 'How Can I...?' started by Christoph, Jul 11, 2016.

  1. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,308
    Hi guys,

    Others asked for a solution for rewarding coins or points for killing enemies. This is already possible with a workaround: just use a big action in the death animation of the enemy. That's all...

    ... well not really. Hahaha. Actually, there is a small bug when placing the action in the death animation. A very weird one and I already reported it to support some weeks back. Not sure if they will take care of it though. But just make sure to check your game in debug mode. When you start the game and the action is released immediately, then you need to move the action to the side of the center point of the death animation. When the action is placed over the center point it will cause this bug.

    I attach you a bbdoc which shows the correct way and it's working 100%. Hope this helps you to understand how it's done exactly. When you do this with your own game, just place the action on your play-field, select it and hit copy (cmd+c on Mac and ctrl+c on PC), then go to the death animation of your enemy and paste it (cmd+v on Mac and ctrl+v on PC). Also, don't forget to scale the action really huuuuuuge so it covers the entire screen. After that, adjust the collision shape to the new scale too so your character will catch it for sure.

    Cheers!
    Christoph

    Update:
    Step by Step Tutorial here!
     

    Attached Files:

    Last edited: Jul 26, 2016
    itzonator, SuperVudu, Mike A. and 9 others like this.
  2. INKY

    INKY Avid Boxer

    Joined:
    May 13, 2016
    Messages:
    161
    Likes Received:
    67
    And trumpets sounds...and there was great rejoicing!

    :) Thanks
     
    Christoph likes this.
  3. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,064
    Likes Received:
    479
    wow thank you Christoph i didnt know that actions can be placed inside the animation box that would open up lots of gameplay possibilities and i saw the bug it's really weird i hope they fix it.
     
    Christoph likes this.
  4. carlosabreu1981

    carlosabreu1981 Boxer

    Joined:
    Jan 13, 2016
    Messages:
    92
    Likes Received:
    38
    Awesome Trick,
    Thanks. :D
     
    Christoph likes this.
  5. jcalle

    jcalle Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,147
    Likes Received:
    510
    Thanks a lot
     
    Christoph likes this.
  6. khalid

    khalid Avid Boxer

    Joined:
    Feb 17, 2016
    Messages:
    343
    Likes Received:
    67
    Thank you man this great idea, I didn't check it yet but I think it will work...
     
  7. INKY

    INKY Avid Boxer

    Joined:
    May 13, 2016
    Messages:
    161
    Likes Received:
    67
    @heathclose have you seen this ? I think you were looking for this as a feature. A work around for now :)
     
  8. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,024
    Thank you for thinking of me :) @INKY

    Yah this is an Epic hack thanks to @Christoph
     
    INKY likes this.
  9. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,308
    heathclose had the privilege to be the first to get this bbdoc some weeks back. :D Great to see that you can all make use of it guys. Keep hacking!
     
    INKY likes this.
  10. VectologyGames

    VectologyGames Serious Boxer

    Joined:
    Oct 5, 2015
    Messages:
    529
    Likes Received:
    473
    Christoph likes this.
  11. VectologyGames

    VectologyGames Serious Boxer

    Joined:
    Oct 5, 2015
    Messages:
    529
    Likes Received:
    473
    Buildbox is almost a fully object oriented program.
     
  12. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,308
    What do you mean with object oriented?
     
  13. VectologyGames

    VectologyGames Serious Boxer

    Joined:
    Oct 5, 2015
    Messages:
    529
    Likes Received:
    473
    Basically you can control everything. Your discovery changed everything.
     
  14. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,308
    Actually it was someone else's discovery some months back. Not sure who it was though. My memory is weak. Probably it was @brakewind723 who mentioned once that actions can be copied to animations in general. This can be an action animation, a death animation or even the characters jump animation. So you could design a gold-shitting donkey if you wish which is really nice. :D

    But yeah, this opens a lot of new possibilities and I hope, being a hack, this won't be closed by the development of the software but rather made a feature. The cool thing is that this kind of discoveries only are possible if we help each other as a community. One thing leads to another... so lets keep sharing ideas and techniques.
     
    Bllaaa, FranciscoBala and cvhrnutds like this.
  15. Fatlung123

    Fatlung123 Boxer

    Joined:
    Jul 12, 2016
    Messages:
    2
    Likes Received:
    0
    How can you put the action(Cube Helper) in the enemy's "Defeated Animation" ?
     
  16. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,808
    Likes Received:
    2,308
    Step by Step Tutorial:

    1. make a small png with a particular color that works as a helper image. Something really small, like 4x4px.
    2. import the image as an action
    3. Go to the action panel on the left and select the action you just imported
    4. Go to the default animation and click on the pen icon to edit it
    5. Change the scale to something really big. Like 160x90. Make sure it is bigger than a iPad screen. Close the window again.
    6. Click on Collision Shape Edit (which is right above the Default animation)
    7. Click on the "square-with-the-four-dots"-icon. This will adjust the collision shape to the new scale
    8. You'll see that the imported action in the game-field is now really big (exactly as you scaled it). Select the action and copy it by clicking cmd+c (Mac) or ctrl+c (PC)
    9. Delete the action from the game-field
    10. Go to the enemy death animation, click on the pen icon to edit it
    11. Click on the blank space from the death animation pop-up window once and then paste the action by clicking cmd+v (Mac) or ctrl+v (PC)
    12. Move it so it doesn't cover the center point (because of the bug)
    13. Go back to the action panel, select the action again and set it to 0 opacity
    14. Give the action the value of your choice. This can be coins or points, depending on your setup
     
  17. Fatlung123

    Fatlung123 Boxer

    Joined:
    Jul 12, 2016
    Messages:
    2
    Likes Received:
    0
    It's work!
    Thank you!! : )
     
  18. JoeWilson

    JoeWilson Avid Boxer

    Joined:
    Oct 8, 2015
    Messages:
    171
    Likes Received:
    65
    This is cool and just what I was looking for. I didn't know you could put actions in the death animations either. Thats fantastic. You can now have enemies drop power ups, coins, and rewards points for the kill! Awesome!
     
    Christoph likes this.
  19. Aksoy

    Aksoy Boxer

    Joined:
    Aug 2, 2016
    Messages:
    9
    Likes Received:
    3
    I have followed those steps above several times over, including within the bbdoc provided.
    It will not allow me to paste the action within the defeated animation. Am I missing a step here?
     
  20. JoeWilson

    JoeWilson Avid Boxer

    Joined:
    Oct 8, 2015
    Messages:
    171
    Likes Received:
    65
    @Aksoy not sure why this isn't working for you. I just copy and pasted the action in the defeated animation and it worked like a charm. Be sure the object is really huge so that your player character will pick it up immediately every time. Add a score to the world UI so that you known its working. Best of luck
     
    Christoph likes this.

Share This Page