Discuss Scratch

Griffin_Dragonus
Scratcher
100+ posts

Only one point to come

I am making a project where there is helicopter which has to shoot bad things in the buildings.
The player has to click in the box and missile comes shooting out destroys it. It also increases kills by 1.
But the problem is when I use this:
forever
if <touching [fault v] ?> then
change [Kills v] by (1)
end
end

But once it is touched it keeps increasing on and on until the balls goes away from the thing.
How do I solve this?


I support Russia
#newussr
(I know many 99.98% of da people don't support me)
HenriStar8
Scratcher
100+ posts

Only one point to come

you should make it a clone, then after increasing the kills if should get deleted
or you could make that:
when green flag clicked
...
wait until <not<touching [fault v] ?>>

when I receive [Nothing to do v]
repeat until <get a thing to do>
Draw
Make games
...
end
BestTrainerMon
Scratcher
47 posts

Only one point to come

Griffin_Dragonus wrote:

I am making a project where there is helicopter which has to shoot bad things in the buildings.
The player has to click in the box and missile comes shooting out destroys it. It also increases kills by 1.
But the problem is when I use this:
forever
if <touching [fault v] ?> then
change [Kills v] by (1)
end
end

But once it is touched it keeps increasing on and on until the balls goes away from the thing.
How do I solve this?

You just need to add this:

forever
if <touching [fault v] ?> then
change [Kills v] by (1)
wait until <not <touching [Fault v] ?>
end
end







A scratcher that only makes games


See my best projects

Sword wars Multiplayer ⚔️ | Agario |Cloud Bullet Tutorial | cloud multiplayer engine

















BestTrainerMon
Scratcher
47 posts

Only one point to come

If it's a clone then you can do this:

when I start as a clone
wait until <touching [Fault v] ?>
change [Score v] by (1)
delete this clone

A scratcher that only makes games


See my best projects

Sword wars Multiplayer ⚔️ | Agario |Cloud Bullet Tutorial | cloud multiplayer engine

















Griffin_Dragonus
Scratcher
100+ posts

Only one point to come

Thanks everyone for your suggestions! I am grateful!
But I got round this problem by:
forever
if <touching [fault v] ?> then
change [Kills v] by (1)
end
end

and in the fault:

forever
if <touching [missile v] ?> then
hide
end
end


I support Russia
#newussr
(I know many 99.98% of da people don't support me)

Powered by DjangoBB