Search found 4 matches

by JacobTheFox
Sun Jan 08, 2017 8:50 pm
Forum: Support and Development
Topic: How to make a delay between code?
Replies: 4
Views: 4858

How to make a delay between code?

Hey, I got two areas of code that i want to separate, but when I use love.sleep, as soon as I click on the start button in the menu it starts sleeping, without the waiting screen showing up. function love.draw() if gamestate == "playing" then love.graphics.rectangle("fill", 0, 0,...
by JacobTheFox
Sun Jan 08, 2017 4:20 pm
Forum: Support and Development
Topic: How to play a sound when I hover over a button?
Replies: 5
Views: 4434

Re: How to play a sound when I hover over a button?

Yay, it's working now. Thank you!
by JacobTheFox
Sun Jan 08, 2017 12:43 pm
Forum: Support and Development
Topic: How to play a sound when I hover over a button?
Replies: 5
Views: 4434

Re: How to play a sound when I hover over a button?

function button_check() for i,v in ipairs(button) do if mousex > v.x and mousex < v.x + medium:getWidth(v.text) and mousey > v.y and mousey < v.y + medium:getHeight() then v.mouseover = true else v.mouseover = false end end end Thats the mouseover field. I tried to just do sound:play() but while I'...
by JacobTheFox
Sun Jan 08, 2017 7:05 am
Forum: Support and Development
Topic: How to play a sound when I hover over a button?
Replies: 5
Views: 4434

How to play a sound when I hover over a button?

Hello people of the Love2D Community, I'm having a few troubles getting a sound to only play once while hovering over a button. Heres my code: sound = love.audio.newSource("assets/menusfs.mp3", "static") function button_draw() for i,v in ipairs(button) do if v.mouseover == false ...