Trigger An Action Based On Score

Discussion in 'How Can I...?' started by Pugnacious1, Sep 22, 2016.

Tags:
  1. Pugnacious1

    Pugnacious1 Boxer

    Joined:
    Sep 22, 2016
    Messages:
    3
    Likes Received:
    1
    I have looked high and low; read and re-read the manual as well as experimented with the available options in the engine. I am going to go out on a limb here and ask is there any way to trigger an action based on the score?
    Specifically I want to try and have some text pop up temporarily at different intervals based on the current score.
    Basically like a little reward for the player similar to this:
    10 points= AWESOME!
    50 points= KEEP IT UP!
    100 points= Did you make this game?
    so on and so forth...
    Ideally I would like them to be a single frame animation in a speech balloon thing.
    Any help would be appreciated. It would be a shame if the engine isn't set up for something simple like that.
     
  2. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    I havent found a way to do that yet myself. It would be an awesome feature to have
     
  3. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Just make an event observer - for example - that looks at score 50, with a new UI that contains the text in the open part of the UI. You even can animate it, so yeah, this is pretty much possible. Just don't call it "action" as this can mislead some users in Buildbox.
     
  4. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    all you need to do is use observers to load duplicate UI with autohide on the messages to give a fade...

    here is a bbdoc for you to study...

    https://www.dropbox.com/s/c6k3cxbl1tv78df/point_based_messages.bbdoc?dl=0
     
    Bllaaa, deenasty, tanvir8955 and 3 others like this.
  5. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    looks like @Christoph was posting the same thing at the same time lol

    i like his idea of animating it better than just autohide
     
  6. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    Great tips and thanks for the share of the file @heathclose - but wont all this UI loading just clog up memory in your game?
     
    Pugnacious1 likes this.
  7. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Everything you do will take up memory or cpu. But I don't think some additional UIs will break your game. Just don't over do it. :D Having said that, I think the main problems with memory issues in Buildbox games are big graphics/animations, spawners and wake-up elements.
     
    Pugnacious1 and spicedbeangames like this.
  8. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    'Big graphics'? What's considered 'big'?
     
  9. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Everything that is over a 1:1 ratio. Never scale down. Sorry if I misspelled that. :D And another rule would be not to go above 2 atlases. Even though some games can work well with up to 5 I guess. But two or less atlases are always better.

    Update:
    Ha! And thinking about it more: lights are eating up the cpu/gpu and effects like the reflection are killing most devices.

    So generally speaking, just don't use too much of anything. A good balanced game is always best.
     
    heathclose likes this.
  10. spicedbeangames

    spicedbeangames Miniboss Boxer

    Joined:
    Mar 31, 2016
    Messages:
    1,389
    Likes Received:
    596
    Yeah I have the ratio figured out, but the game i am working on has 7 atlases so far. It will be all but impossible to stay within the limits of 2?
    I'm also testing as I go, and it works on all devices thus far.
     
    Christoph likes this.
  11. Pugnacious1

    Pugnacious1 Boxer

    Joined:
    Sep 22, 2016
    Messages:
    3
    Likes Received:
    1
    Wow guys! Thank you very much for the input. The overwhelming response is unbelievable. They said the community for Build Box was knowledgeable and helpful and everyone proved it to me today. Again thank you so much.
     
    Sean Buildbox likes this.
  12. Pugnacious1

    Pugnacious1 Boxer

    Joined:
    Sep 22, 2016
    Messages:
    3
    Likes Received:
    1
    That is something I did not even think about. Thanks for the heads up brother.
     
  13. Phathomhive Games

    Phathomhive Games Boxer

    Joined:
    Aug 17, 2016
    Messages:
    4
    Likes Received:
    0
  14. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,065
    Likes Received:
    479
    i have used this trick mentioned above to make a button appear
     
  15. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,065
    Likes Received:
    479
    @Andy @heathclose Why this method it dosnt work with advanced move and component action button am i doing something wrong i thought that bug was fixed in earlier release i mean having component action in multiple ui as when the event observer get activated to change the ui the game suddenly get stuck. all my game depend on this to make it work.
     

Share This Page