Discuss Scratch

5b_aeron_chs
Scratcher
6 posts

Variables are decreasing randomly

So, i have a problem with my dungeon crawler i am making. I made a player and made it so that if it touches a specific thing its health variable decreases. BUT after playtesting a bit, for some reason the players health variable is decreasing even when the player is not touching the thing that makes the player's health decrease. I am very sure my code is alright because before all of this happened, it worked perfectly fine. Could you please help me fix this or give suggestions on how to fix it? Thanks
Kono_Muda_Da
Scratcher
100+ posts

Variables are decreasing randomly

Maybe use this code?


when I receive [ game start?]
forever
if <touching [ enemy] ?> then
change [ Health] by (-?)

end
end




heheh my own banner
when I receive [jojo reference v]
say [IS THAT A JOJO REFERENCE]
switch costume to [NO WAYYYYY v]
repeat until <[jojo reference] = [0]>
turn cw (1) degrees
set [ mosiac v] effect to (100)
change [color v] effect by (25)
end

Check out my profile!
Wow! My 100th post already!
My greatest project!
My second greatest project!





H̸̨̧̧̧͍͕͖̫͉͙̦̖̳̦͔̪͇̫̫̲̞͚͈̼̺̟͖̯͔̱̭̬̰̗͎͖͎̘͊͒̋́̉̒̿̈̇͛̓̑̀̈́̊̀͑̋̓̃́͋̊̎̏͐͗͊̄̌͊̽̇̆̀̈̄͌̏̔̅͒́͆̊̉̑̄̾̕̚̚̚͘͘͜͝͠͝͝͝͝͝ ̸̨̛̦͙̱̗̦̯͑̓̅͋͂̿́̔̇͌͒̊́͐̒͗́̒̑̾̎̕̕̕͘̕͝E̶̻̼͓̯͛͛̄͂̓́̈̈́̈́̈́͂͐̚͘͠ ̷̨̨̡̢̧̢̨̤̩̪͚̭̠̼̣̝̲̼͙̥̘̺͎̫̤̲̖̘͔͍͉̫̭͇̞͖͔̠̤͚̞͇͚̹̥̊́̃̆͑͗̈́̈́̊̆̃̀̎͆̕͘͜͝H̵̢̡̗̬̩̺͍̥̪̘̅̑͒̓͋͑̐̿͂̇̅̄̐͐̉̈́̓̉̈́̈́̀̈́͘̚͠͠ ̶̨̛̲̪̝̬̻͗͒͆̀͂̓̈́̔́̊͒͊͐̃̑͑̃͒̂̆͗̀͛͂̔̀̕̕͘̕͜͠E̸̡̧̡̜̙͓͖̻̰̥̹̞͉͔̹̦͈͇̤͎̜̗̼̹̒̽͐̅̆̅͑̀̂͊͂̀̉̊̀̾̓͊̉͋̍̏͂͑̓̿̑̑͊̎̓̍̓͗̀̇̈̏͛̆̏̈́͂̈́͛̈̄̋͘̕͝͝ ̵̛̛̤̟̤̾̽̿͌́̂̈͂̀̐̃̂͒̂̈͌̽̋̂̑́̈́̃͋͗̉̅̀̋͂̏̽̿̇̀̑͑̑̌͌̈́̀̔̆̊̕̚̚͘̕͘͘͝͝͝͝͝H̵̨̡̡̨̧̢̛̛͎͎̼̯͕̰͖͙̣̠̳̭͚̙̱̲̙͔̞̥̻͎͎̱̫̜̖̣̩̜̯̯͎̮̊̾̿̐̈͗̅́̒̄͛̂̒͂̆̂̽̂̍͂̑̀͘̕͝͝͝͝͝ͅ ̴̖̻̝͇̻̻̻̗͚̼͍͛̏͌̿̏̓̐̂͛̉͑͗̆͋̈̿́̌̔̈́̈́̃̕ͅĘ̵̧̧̡̝̣̪͕̩̖̗̖̜͎͇͚͎̻̘̮͈͉͎̳͓̜̳͇͇͖̬͍͖̲͎͖͇̗̠̥̭̮͉̰̻͓͍̘̮̼͓͒͗̌̍̓̔̕͜͝͠͠͠ͅͅ ̷̮̤̦͉̣͉͍̠̪̺̍̉͗̇́̋̎͛̑̓̂̈́̑̒́̈́̑̕̕͠ͅH̸̨̧̡̛̛̫̥̱̲̲̞͍̬̫͉̭̮̗̳͙̱̲̪́́͐̋͛̒̌͐̾̍́̄̂̀́̆͋̎̓͐̓̓̌̔͋̄́̓́̇̇͐̑̕̚͘̚͠͝ ̸̢̛̺͚̝̜̙͇͍͙̬̰̳̗̳̙̭̭͉̫̝̊̌͆͑̓́́̓͛̅̀͊̀̑̊̇̂̐̋͐͘͝͝͝͝͝ͅͅA̶̡̧̢͕͉̼̰̗̬̲̱̼̹̰͓̫̤̯̹̩̫̪̗̹͔̙̝͇͍̤̗͈͇̠̺̩̲̹̙̪̞̦̘̼͔̠̦͒̾͌̐̏͌͐͐̊͆̀̋̈́͒̒͋͒́̎͆̋̐̽̍̂̔̾͌́̃͒̓̒̕͘̚͜͝͠͝ͅͅͅ ̷̧̡̧̝̥̺͕̺̜̙͉̬͔͈͕̳̌̑̅̎͂̏̃̀̓̎̍͂̎͘ͅW̵̧̢̡̢̡̡̨̨̡̛̛̛͇̤̪̠̤̟͇̰̼̥̼̗̯̺̳̦̩͎̹͔̜̘̹̥̖̙͍͎̬̾͌̈͋́̾̈́̈͊̐̑̈́̈́̀̄̽̽͂̉͊͂́͊̃̓̀͊̌̄̃̽̓̍̄̌͋̉͘̕͜͝͝ͅ ̴̧̢̺̹̺̜̞͔̖̩̞͖̼̖̞̬̼̓́̉̄͋̈́̇͑̇̽́͘̕͝͝͠
deck26
Scratcher
1000+ posts

Variables are decreasing randomly

Please either share the project or give us the project number so we can look at it. Otherwise we can only guess.
5b_aeron_chs
Scratcher
6 posts

Variables are decreasing randomly

@Kono_Muda_Da it worked Thanks for your help

Powered by DjangoBB