Score Based On Rotation In "around The World" Game?

Discussion in 'How Can I...?' started by spacerain, Aug 27, 2017.

  1. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    I'm working on a game with the "Around the World" preset where the character revolves around an object. How do I make it so that it scores a point every time it reaches the bottom and the top of the planet? I'm starting to think it's not possible for there to be any scoring for the Around the World preset. Is there a way for there to be not a "Revolution-Based" rather than "Distance-Based" scoring?
     
  2. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    You should keep all of your questions in one thread. They all have the same answer pretty much, which would help answer the others too.

    You can either spawn objects that drop an Action when it's defeated, or use an Action button to score a point every time you jump.
    But it depends on what your game is like.
    You could even have invisible coins at both the tops and bottoms of your "around the world".
     
  3. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    I can't defeat objects because the character doesn't fire bullets; all it's supposed to do is change the direction it orbits when the screen is tapped. The character doesn't jump either.

    I'm already trying to put invisible coins at the tops and bottoms of the planet, but the problem I'm having is having them re-appear after they're collected.

    For reference, here's the game I'm trying to make: https://itunes.apple.com/us/app/space-rain-avoid-the-falling-stars/id1091128859?mt=8 It's a game I made with a different game making software (GameSalad) and am trying to replicate with Buildbox.
     
  4. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    Put a action set to points and put it where you want the character score.
    Set the opacity to zero..
    In the action place another action set to points and the duration set to 1000000 and it should spawn
     
    AaroArts likes this.
  5. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    How do I place an action in another action? Do you mean copy an action and paste it in the first action's action animation? What I'm trying to do is have an action (coin) spawn right above the planet when the coin below the planet is collected and vice-versa.
     
    Last edited: Aug 27, 2017
    adrogdesigns likes this.
  6. adrogdesigns

    adrogdesigns Avid Boxer

    Joined:
    Dec 5, 2016
    Messages:
    318
    Likes Received:
    233
    yea, but it will take some aligning. so have two actions set to points, copy and paste in the other actions animation box. place your world object in so you can align the points action then delete the world object. make sure to set the duration of the actions to a long duration so they last long enough.
    should work. i think?
     
  7. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Why don't you just reward a coin every time the user taps?

    Or use a timer and score in seconds?

    If you want a object to be destroyed you can spawn an object like I said and have a separate object attached to the character that acts as a bullet, so every time the character hits the object, it destroys it.
     
    molion, adrogdesigns and Benfont like this.
  8. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    Hi there,

    You could also create an action that adds +1 points when your character collides with it.
    Then cut that action and paste it inside an object, then place that object as a decoration and set its visibility to 0 so it does not shows during gameplay.
    If you do this properly, then every time the character goes through the object you will get a +1 in the points and also you don't have to worry about spawning the coins every time. the object will always be there and it will give you points every time you go through it.
    I hope I explained myself properly.

    Good luck with your game,
     
    adrogdesigns and AaroArts like this.
  9. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    I tried that already, but every time the object moves to a different location the action is no longer there. The action is only there and can only be collected once. I don't know how to have the action stay with it.
     
  10. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    https://drive.google.com/open?id=0BxWP2SOEw49KM0FQQ3JESkJmSk0

    Hey man, I made a quick bbdoc with a work around I found.
    I had to add a spawner to the object, otherwise the action would not reappear.Check how it works using the debug mode.

    There is only one small bug though, the first point gets added twice *I have no idea why*
    Maybe send this bbdoc to support to see what they say,
    I hope this helps,
    cheers
     
    adrogdesigns and AaroArts like this.
  11. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    Thanks for putting that together for me. Unfortunately, I've tried this already and the coin actually provides multiple points every time it's collected. The reason for this is that it spawns at a rate of 5, so multiple copies of it spawn in the same place, hence why they all get collected thus adding all those points. Thank you though for taking the time to look into this and create the file for me!
     
    Benfont likes this.
  12. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    no worries, but the file I sent you just counts double the first point - the rest are ok.
    So maybe there is a bug we are not aware of,
    I would recommend you to contact support and ask them,
    Cheers
     
    AaroArts likes this.
  13. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Awesome!
    Maybe you could start with a score of -1 so the first double point takes you to 1.
    This was the way I would have done it too.
     
    Benfont likes this.
  14. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    well that would totally fix it - I should have thought of that before.. well done! @AaroArts
    @spacerain I believe with this new workaround the problem should be solved. No need to even contact support then,
    Good luck with your game!
    Cheers
     
    AaroArts likes this.
  15. AaroArts

    AaroArts Miniboss Boxer

    Joined:
    Jun 22, 2016
    Messages:
    1,546
    Likes Received:
    826
    Alternatively, you could have a seperate one-off action that rewards -1 and place it over the top, and disappears after one collection, that way you'd only score 1 on the first trip around.
    Great template anyway. This should help a lot of people :)
     
    Benfont likes this.
  16. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    Are you sure when you test it it only adds 1 point each time you collect the coin after the first time? Because for me it adds 3 or 4 (or however many have spawned during that time) each time the point is collected. Also I'm on Buildbox 2.2.9 but I don't know about you.
     
  17. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    hi there,
    Yes I am totally sure - in the file I sent you the only time the points are counted twice are the first time, then it only counts once..
    I set the spawner to 5 seconds which is what it takes the ball to do a full lap so it will only count 1 point every time it passes through the object with the action (except for that first time bug)
    Add the -1 action just like @AaroArts said and everything should be fine then.
     
    AaroArts likes this.
  18. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    Thanks, I've sent my file to support to make sure there aren't any bugs. Also, what version of Buildbox are you using?
     
  19. Benfont

    Benfont Avid Boxer

    Joined:
    Sep 27, 2016
    Messages:
    277
    Likes Received:
    278
    I am using 2.2.9.0
     
    AaroArts likes this.
  20. spacerain

    spacerain Boxer

    Joined:
    Dec 4, 2016
    Messages:
    42
    Likes Received:
    6
    I think I might know what the problem is. If you take extra time to collect the coin, you will gain more than one point. In my game, you switch from counterclockwise to clockwise back and forth to avoid meteors that are coming for you. Hence it would give the object containing the action (coin) more time to spawn and therefore it would spawn more times. I think the reason you only get 1 point per coin is you're getting the coin right away. If you avoid the coin for a while and then get it then the result would be different. Thanks again for all of your time in helping me, though.
     
    Benfont likes this.

Share This Page