I'm having trouble animating a button, can someone help?

id: 751064

category: Help with Scripts

posts: 5

Ecowley006 Ecowley006 loading
I've been trying to make a button that gets bigger when I mouse over it.
The trouble is, the button seems to think I'm always mousing over it.
If it helps, I use turbowarp for the lag, dunno if it changes any code.
when green flag clicked
…(unrelated stuff for looks)
forever
if <touching [mouse pointer]> then
go to x: (0) y: (1)
set size to 117 %
else
go to x: (0) y: (0)
set size to 100 %
end
end
I don't think there's anything else, but if you have ideas, I can show more code.

Ecowley006 wrote:

I've been trying to make a button that gets bigger when I mouse over it.
The trouble is, the button seems to think I'm always mousing over it.
If it helps, I use turbowarp for the lag, dunno if it changes any code.
when green flag clicked
…(unrelated stuff for looks)
forever
if <touching [mouse pointer]> then
go to x: (0) y: (1)
set size to 117 %
else
go to x: (0) y: (0)
set size to 100 %
end
end
I don't think there's anything else, but if you have ideas, I can show more code.
https://scratch.mit.edu/projects/992075624/ check this out
Ecowley006 Ecowley006 loading

invalidaccess wrote:

Ecowley006 wrote:

I've been trying to make a button that gets bigger when I mouse over it.
The trouble is, the button seems to think I'm always mousing over it.
If it helps, I use turbowarp for the lag, dunno if it changes any code.
when green flag clicked
…(unrelated stuff for looks)
forever
if <touching [mouse pointer]> then
go to x: (0) y: (1)
set size to 117 %
else
go to x: (0) y: (0)
set size to 100 %
end
end
I don't think there's anything else, but if you have ideas, I can show more code.
https://scratch.mit.edu/projects/992075624/ check this out
Thank you, I'll try it
Ecowley006 Ecowley006 loading
Thanks for the growing bit, but my trouble is that the button immediately starts growing when I start the project, not that the button won't grow.
Then you should make the button grow when the cursor is hovering over it.. maybe when you start the project your cursor is already hovering over the button?