mousepressed vs. mouse.isDown PowerUp
Posted: Sun Dec 30, 2012 8:18 am
Scenario Normal: When a user hits an entity:
Scenario wished for: For specific entity when killed or hit I wish to grant a power up.
I think this will come from love.mouse.isDown ("l") with a random number associated with dt in love.update and function Powerup
The random number associated with dt will be so that the Powerup does not last forever.
I have searched, tried, and have not been able to solve this. I hate asking for code but if anyone has any pointers I would be grateful!
Code: Select all
function love.mousepressed( x, y, button )
if button == "l" then
ents.shoot(x, y)
end
I think this will come from love.mouse.isDown ("l") with a random number associated with dt in love.update and function Powerup
The random number associated with dt will be so that the Powerup does not last forever.
I have searched, tried, and have not been able to solve this. I hate asking for code but if anyone has any pointers I would be grateful!