Change Character In Buildbox 3 - Sample

Discussion in 'Buildbox 3.0' started by weboha, Dec 31, 2018.

Tags:
  1. weboha

    weboha Avid Boxer

    Joined:
    Aug 8, 2018
    Messages:
    239
    Likes Received:
    178
    itzonator, Greatone and Dario like this.
  2. bgwiss

    bgwiss Boxer

    Joined:
    Oct 31, 2018
    Messages:
    58
    Likes Received:
    19
    Hey Weboha,

    This is great, but what if we want to allow the user to select a new character from a UI menu? how do we link that to what you have done?

    Thanks
    Wiss
     
  3. weboha

    weboha Avid Boxer

    Joined:
    Aug 8, 2018
    Messages:
    239
    Likes Received:
    178
    i think its possible to make in UI but not easy. i didn't try yet.
     
  4. superfabiuz

    superfabiuz Boxer

    Joined:
    Nov 23, 2018
    Messages:
    19
    Likes Received:
    2
  5. nyamuk91

    nyamuk91 Boxer

    Joined:
    Aug 15, 2018
    Messages:
    95
    Likes Received:
    20
    Any solution yet? seems like the API documentation is not yet complete to even do this through coding
     
  6. bgwiss

    bgwiss Boxer

    Joined:
    Oct 31, 2018
    Messages:
    58
    Likes Received:
    19
    for which part you need solutions?
     
  7. nyamuk91

    nyamuk91 Boxer

    Joined:
    Aug 15, 2018
    Messages:
    95
    Likes Received:
    20
    I mean unlock/changing the character through UI. I can't seem to find a way to connect "Lock Button" with unlocking characters
     
  8. bgwiss

    bgwiss Boxer

    Joined:
    Oct 31, 2018
    Messages:
    58
    Likes Received:
    19
    nyamuk91 likes this.
  9. nyamuk91

    nyamuk91 Boxer

    Joined:
    Aug 15, 2018
    Messages:
    95
    Likes Received:
    20
  10. nyamuk91

    nyamuk91 Boxer

    Joined:
    Aug 15, 2018
    Messages:
    95
    Likes Received:
    20
    Just looked into the BBDOC. It solved one of my problems, however, it is not the "buying/unlock character" functionalities that I'm looking for. What I'm looking for is something like having a character that is locked and can only be purchased by a certain number of coins. The button itself has several states like "Normal", "Locked", and "Selected". The button can only be clicked if the user has the required amount of coins. After the user had purchased the character, the character is then unlocked. This is doable in BB2 however in BB3, the "Lock Button" that supposedly served these functionalities is not fully working.

    However now that I have some pointers, I believe I can do this with scripting by manipulating Settings variable (though I foresee that it will be a mess). Hope that the "Lock Button" is fully functional in BB3 final release (which I believe is around the corner?)
     
  11. bgwiss

    bgwiss Boxer

    Joined:
    Oct 31, 2018
    Messages:
    58
    Likes Received:
    19
    I think it is possible to do with scripting, however the coins still don't work in BB3, the only counter is points. In a previous discussion with BB team, they have mentioned the purchasing and unlock buttons will be revealed in the final version as these are still beta version.
     
  12. weboha

    weboha Avid Boxer

    Joined:
    Aug 8, 2018
    Messages:
    239
    Likes Received:
    178
    i think its possible to make lock and unlock with buttons and scripts. i will try this week and if i can i will share.
     
    landofgreendev likes this.
  13. Leighton

    Leighton Avid Boxer

    Joined:
    Jan 31, 2018
    Messages:
    373
    Likes Received:
    181
    Code:
    function init(){
    }
    
    function update(dt){
    }
    
    function signal(name, value){
        if(value){
            let amount = this.attribute('Amount');
            this.scene().addScoreCoin( amount );
        }
    }
    
    I figured out how to use coins Just change AddScorePoint to AddScoreCoin
     
    Nickaroons likes this.
  14. landofgreendev

    landofgreendev Boxer

    Joined:
    Nov 9, 2018
    Messages:
    84
    Likes Received:
    18
    Did you manage to figure this out? I have made a Character unlock UI but I am having trouble trying to link the lock/unlock buttons with a new character.
    For example, when the user collects enough coins to unlock a new character, they can press the character and the button is unlocked - they can then press their new character and when they play the game, they will be playing as the new character. - That is what I am trying to do, has anyone had any luck with this?

    Thanks in advance! :)
     
  15. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    As of this very moment BB3 doesn't have the in-game currency feature fully implemented, your case, characters is currently not functioning as planned I think. You are not able to choose the character within the Lock button and Unlogic logic. This is also true when you try to use Scenes and World and World Scene.

    However, what you can do is copy your world, place character that player buys as Actor within this copied world. Now use the Lock button and Unlock logic to unlock a Menu, appears this feature is implemented. Now setup the Actor/multiple characters up as normal for in-game currency sale but it will actually link to the new copied world you setup for each character. I know it is a cheesy work around, but should work as long as each of your copied worlds has a unique menu to link to.
     
    landofgreendev likes this.
  16. Josh (Nology Games)

    Josh (Nology Games) Community Manager

    Joined:
    Nov 27, 2017
    Messages:
    869
    Likes Received:
    268
    This is something that should hopefully be Doable by the full release
     
    landofgreendev likes this.
  17. landofgreendev

    landofgreendev Boxer

    Joined:
    Nov 9, 2018
    Messages:
    84
    Likes Received:
    18
    Great, thank you for the help! I'll try and have a play around with it :) Yes, I have spent a lot of time trying to get a scene unlock to work but that obviously isn't in BB3 as of yet:( I only need to get the Character unlock and Scene unlock working before I can release my game.

    Awesome, glad to hear it may be in the full release - It's something I know quite a few people are trying to accomplish in BB3 - I for one really need this feature added :) Is there any idea of when the full release would be? I understand this may not be possible to say, but I'm looking forward to the full release!
     
  18. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Cool, pretty sure this trick will work for your needs and you'll get it released.
    Good Luck!
     
    Last edited: Feb 9, 2019
  19. Codifie

    Codifie Avid Boxer

    Joined:
    Apr 17, 2018
    Messages:
    364
    Likes Received:
    190
    Played with this a little bit in BB3. I was wrong, my idea has a couple of issues. First, although it appears Menu Lock/Unlock has been implemented when you add items to the UI, it actually is not, no link/connection is made so you can connect to the designated menu. So, I was wrong, this trick will not work currently either.
    I also realized a possible different issue , which is what I was actually trying to test. After the player buys a character using my technique, there isn't a way for the system to remember that you want to start at this new world, rather than the default world. Thought I might have a fix for it, but then seen that no connection is available after using the Lock/Menu feature.
     
    landofgreendev likes this.
  20. landofgreendev

    landofgreendev Boxer

    Joined:
    Nov 9, 2018
    Messages:
    84
    Likes Received:
    18
    Thank you so much for trying! Was just about to test it out. I really appreciate the help - hopefully it will be fully implemented in the BB3 release, alongside scene unlock!
     

Share This Page