I cant find any bug here?

How do I…

fix this bug,

there was supposed to be 90% chance for destroying object and nothing else

and 10% to replace the object with diffrent sprite, but it seems that the 10% gets to roll 100% of a time, i alr tried like 10+ times if it was just luck but no, im new so i am not as experienced as any of you so dont be mean pls, thanks

Event 1 — At the beginning of the scene, trigger once

  • Wait 1 second
  • Change variable rngfishng → set to RandomInRange(1,100)
  • Create object fishing at position 456;84 (layer: Base layer)

Event 2 — If variable rngfishng ≤ 10, trigger once

  • Wait 4 seconds
  • Delete object fishing
  • Create object fishing_pirana at position 456;84 (layer: Base layer)

Event 3 — if variable rngfishng > 10, trigger once

  • Wait 4 seconds
  • Delete object fishing

i couldnt post the ss because it says no link, even tho its j ust screenshot but i guess it thinks its a link

When the scene starts rngfishng is the default value. Probably 0 unless you changed it. It’s not being set to the random value for a second. So, the first time it will always trigger the less than event. If the random number is greater than 10 then the 2nd event will also be trigger after 1 second when the random number is generated.

You could pick the random number before the wait action.

A picture of what you need

You will need to use a sub-event for this one, and replace the At the beginning of the scene with whatever trigger you want.