Would my rule go like this?
CoolBee
Member Posts: 81
I am wanting to increase the Y axis for a brief second on touch of the screen to make a bird flap to a power meter, so should I create a touch box over the screen and have it as;
When actor receives touch, change attribute - game.bird -> game.position.Y +50
And also have Acceleration 90/270
I'm not 100% sure on how to do the power meter, as I want the power meter on screen to give say 5 flaps before it runs out but it needs to replenish slowly, so firstly am I correct in thinking I need to make an empty power bar on screen then... Hmmm I don't know where to go, what do I do with the inside 'power' sprites?
When actor receives touch, change attribute - game.bird -> game.position.Y +50
And also have Acceleration 90/270
I'm not 100% sure on how to do the power meter, as I want the power meter on screen to give say 5 flaps before it runs out but it needs to replenish slowly, so firstly am I correct in thinking I need to make an empty power bar on screen then... Hmmm I don't know where to go, what do I do with the inside 'power' sprites?
Comments
2) In terms of the flap meter, I'd make an integer attribute called power. Have it start at 5(or how many flaps before loss of stamina) and then have you lose one power whenever you touch and make the bird fly. From there, you can have it recharge in these two ways:
a) Have a rule- if game.power < 5 then every 5 seconds change attribute game.power to game.power + 1. This will just make it so that if you aren't at full power, you will recharge.
b) If you want something where after those 5 you have to wait, then you can make this rule- If game.power=0 then after 5 seconds change attribute game.power to 5.
These are just a few ways. Please clarify otherwise if this is not what your were asking.
If its not working please tag me like you did before and I will get back to you.