physics - make a score when objects collide

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
valossa
Prole
Posts: 1
Joined: Thu Jul 28, 2016 4:16 pm

physics - make a score when objects collide

Post by valossa »

hello i saw a tutorial about love.physics where a ball interact with blocks, i create some other blocks and the objective of the game is fall the big block, redirecting the ball , and make it hit the blocks to fall.
But i need a little halp to make a score like this:
alwayes the ball hit the big block add a counter on the score, the game will end when the big block falls, win the player that have the lower number of hits to fall the block
Attachments
main.lua
(6.75 KiB) Downloaded 129 times
User avatar
Beelz
Party member
Posts: 234
Joined: Thu Sep 24, 2015 1:05 pm
Location: New York, USA
Contact:

Re: physics - make a score when objects collide

Post by Beelz »

I didn't happen to look at the code, but this may help you.

Code: Select all

if self:hasBeer() then self:drink()
else self:getBeer() end
GitHub -- Website
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest