Power Meter
GingerBGames
Member Posts: 390
Hello GS'ers,
Would anyone be able to lend some knowledge on this project i'm currently working on? I'm trying to make a power bar. I want to make a meter that goes south to north as the player taps as fast as they can to build it, and when it's full it triggers something to happen.
Think of something like a "Strength Test" at a circus! Only in a fighting styled game.
Would anyone be able to lend some knowledge on this project i'm currently working on? I'm trying to make a power bar. I want to make a meter that goes south to north as the player taps as fast as they can to build it, and when it's full it triggers something to happen.
Think of something like a "Strength Test" at a circus! Only in a fighting styled game.
Comments
Again, thanks for helping. If the GameSalad staff aren't paying, they should be!
set physics restitution to 0 for both the dart and the target. then set a rule on the dart that when it collides with the target to constrain x and y positions to the current x y positions. that way any gravity you may have in the scene will be nullified.
to create the power bar w/ tapping:
every tap incrase the power bar by some fixed amount (say 5pts for example) but have a counter effect that decreases the power bar by 1pt every one tenth of a second. you can use a timer to achieve the reduction effect.
have a rule that when the power reaches >=100 throw the dart.
there is a separation between the bar graphic and the bar data. what i mean by this is that the points that go in the bar should be stored in a game attribute called "dart power" or something to that effect.
then the power bar is just a graphicial representation of that.
you can make a simple bar by taking an actor of say 30 width by (dart power) height so as dart power is 0 the height is 0. as dart power is 10 the height of the bar is 10. etc. That is a direct 1 to 1 mapping of dart power to each pixel.
if you want something smoother, say the bar fills up the whole left side of the screen or something when it's 100% then you need to say this instead:
constrain attribute: bar height = dart power / 100 * screen.height
that is basically saying that the dart power is a certain percentage of the screen height.
hope that helps
http://gamesalad.com/game/play/51789
- you would have to add in some elements to the throwing as it would be too easy to get bulls-eye
For the quantum sheep version I would have the board move around and get blurry
for 1st person you'll probably need to have some sort of corelation between y and size. as an object approaches the center of the screen it's size should reduce by an equal amount.
Here's a simple Power Bar - 'Strength Test' Template I've put together... Nothing to do with Darts - but it does have a Power Bar which goes up based on Taps - again, very basic, but demonstrates functionality..
No idea why but Kids seem to love Bashing their iPods/iPhones.... Maybe some like Bashing iPads too...
Heres the link to the free, editable Template..
http://gamesalad.com/game/play/51837
Wayne