Hey, I need help with adding a score when you drag something into a box. I’m done with the dragging part, but I need help with adding the score. Can anyone help? [import]uid: 91873 topic_id: 16406 reply_id: 316406[/import]
you might want to have a
local score = 0
on the top of your code, then after you have dragged *something* into a box, you can have
score = score + 1 – or whatever you want to increase it by
from the information you have provided, that is the best I guess you can get.
cheers,
?
[import]uid: 3826 topic_id: 16406 reply_id: 61251[/import]
It would probably be like if the “ball” enters the box, you get a score. So I guess it would be like a collision?
And thanks for the info Jayant
[import]uid: 91873 topic_id: 16406 reply_id: 61252[/import]
If you’re using a sensor then yes, treat it just like all collisions. (Just be sure that you only add to the score on event.phase == “began”, else the score will go up twice.)
Peach [import]uid: 52491 topic_id: 16406 reply_id: 61644[/import]