Odd bug with my project. (More specific title?)

Hello.

I have a project I’m working on,
https://c.gethopscotch.com/p/z9u3w16y5
And for some reason, when you pick up wood (Tap use when close to a flower shape) after grass (Tap use when close to a weird text /\ thing) it doesn’t work.

But if you do the opposite, it works fine. I’m pretty sure the only objects using any variables for this are “whatcha got there?”, “inventory control”, and “shrub/scenery”. Please let me know if you can find what’s wrong, thanks.
@CodeHelp
@NindroidTester

8 Likes

I would help but don’t have HS

1 Like

Hi @Petrichor

Not a solution but while looking I saw this

That’s just a small part of the really long conditional. Anyways, instead of

(child) x pos < (self) x pos + 100  AND  (child) x pos > (self) x pos - 100

and similar for y pos, you can do this

Abs[ (child) x pos - (self) x pos ] < 100

and similar for y pos. But there’s nothing wrong with what you have. This is just another option that’s gets the same result with less code.

4 Likes

Hi again @Petrichor

Here’s the difference


When the grass is “used” first, ‘RIS result’ is getting set to something other than 0 so then the wood gets stuck in the ‘Wait until done’ recursion

4 Likes

Oh, thanks.

3 Likes

Sorry nindroid I was going to help out but it appears like the hopscotch mathematics god was earlier than me :triumph:

Tag me anytime though I’ll try to be as quick as possible

2 Likes

The game seems cool, and you already got the answer from @ThinBuffalo, so good luck with the rest of the code!

1 Like

Well too late for me to help! Good luck🌟!

Lol who am I kidding I know nothing about code

-x

͡° ͜ʖ ͡°

2 Likes