[Solved]Having trouble making a flail weapon
Posted: Tue Aug 18, 2015 11:24 am
I'm making a game where you swing the flail with the mouse, I want the distance between the player and the square to be less than 150 pixels but I can't get it done
I tried this
but it doesn't really work like I expected it to work
You can download the .love file here
https://www.dropbox.com/s/kmq41zsksn21e ... .love?dl=0
I hope I explained everything well
I tried this
Code: Select all
d = math.sqrt( (spikeball.x - chain.x)^2 + (spikeball.y - chain.y)^2 )
if d < 150 then
spikeball.x = love.mouse.getX()
spikeball.y = love.mouse.getY()
end
You can download the .love file here
https://www.dropbox.com/s/kmq41zsksn21e ... .love?dl=0
I hope I explained everything well