Discuss Scratch

ArandomKidd
New Scratcher
2 posts

Variables being affected by bounce

Basically, I need a way to increase a specific variable after a bounce from an object (a dvd logo)

HOW?

I got bouncing working but I am stuck with this part.

PLZ help

I have made system that checks if an object is a specif x y coordinate is above a value so when it reaches the corners it increases the variable but it does it really quickly and skyrockets the value.

I only want it to go up 1 per bouce
WizWazWuz
Scratcher
100+ posts

Variables being affected by bounce

Could you possibly display what code you are using? By using the block icon to add blocks to show your script. Example:
when green flag clicked
move (10) steps

I have saved this topic, so you can reply and I'll get notified.
ArandomKidd
New Scratcher
2 posts

Variables being affected by bounce

Ok sure

when green flag clicked
point in direction (40 v)
forever
move (10) steps
if on edge, bounce
end

hopefully this works

I also do already have a variable in place

edit: i did connect everything toghether by the way, i just don't know how to make it connect on the forums

Last edited by ArandomKidd (Yesterday 15:40:40)

WizWazWuz
Scratcher
100+ posts

Variables being affected by bounce

Could you share the project? I would like to take a look.
Fancymaster
Scratcher
67 posts

Variables being affected by bounce

if <touching [edge v]> then
change [your variable here v] by (1)
wait until <not <touching [edge v]>>
end
Fancymaster
Scratcher
67 posts

Variables being affected by bounce

looking at what you have said, the main issue is probably the fact that you didnt use the “wait until” block ('skyrocketing values')

Powered by DjangoBB