i've been making a random cat game with a cat you can pet.(using 0.0.6, cuz i dunno how to port my stuff to the new version.)
and well, ive tried to make the cat meow, then stop, and then be able to make the meow sound again. dont worry about the variables a through e. they dont matter for this. they just make the cat look like its meowing. basically, i cant seem to figure out how to make it stop playing the meow sound after its done playing it, and then be able to meow after.
heres my code:
--cat
t=0
a=4
b=5
c=20
d=21
e=6
f=0
g=0
p=0
function TIC()
local purr = {}
purr.p = p
if btn(4) then spr(83,0,0,1,1,0) end
if btn(5) then sfx(0,26,square) end
if purr.p < 5 then purr.p = purr.p+1 end
if btn(5) then a=7
b=8
c=23
d=24
e=9
purr.p = purr.p - purr.p
end
if purr.p > 5 then a=4
b=5
c=20
d=21
e=6
sfx()
end
cls(0)
print("blushy cat - pet sim",10,10)
spr(a,104,32,1,2,0)
spr(b,120,32,1,2,0)
spr(c,104,48,1,2,0)
spr(d,120,48,1,2,0)
spr(e,136,32,1,2,0)
t=t+1
end
hope somebody can help :)
thanks,
jackj106