In the game I’m working on, a unit is supposed to be destroyed when it runs out of health. It seems to work, with the dead unit disappearing. However, some logic still works. This can be seen when the cursor is hovering over the dead unit, or trying to move a unit into the tile where the dead unit was.
got this error
Hey, I don’t think I understand the game enough to reproduce this issue. Can you explain in really simple steps how I can make this bug happen? That way I can figure out what’s going on and see if there’s a bug I need to fix or what.
so first you click the play button, to bring you to the game world
The world take a moment to generate then
once it’s not lagging a lot, click on the red guys holding spears, so that they a little bit see through
then move the cursor to the tile to their right, and press space. this should move them to that tile
Now that the red and blue guy are right next to each other, move to cursor onto the blue guy and press space. This should deal damage to the blue guy, which can be checked on the bottom right info screen
then click the done button on the top twice so that it changed to blue then back to red.
select the red guys again and attack the same blue guys so that their health is below 0
this is when the bug happens. Their health is passed through a filter and activates the destroyer, but when you move the cursor onto the tile the dead guys were occupying you can still see the info panel. Also, you can’t move the red guys onto that tile as well, making it seem like the unit is still there.
I just realized I left it a little broken last night lol, no wonder you couldn’t get it to work. I just fixed it (I hope at least). It shouldn’t be nearly as laggy as well
It still seems pretty buggy to me, the red player disappeared when moving it after killing blue.
…I have no idea how that would happen. The you got the blue player to below 0 health and then moved the red player right?
Yeah, I moved one unit and destroyed blue. Then moved the other Red after that.
ok I can replicate it, this is very weird…It only happens after a unit is killed
It definitely has to be that the unit is moving way too far but I need to figure out why
Edit: Not too far, they just move 2 tiles instead of 1. most likely when you were moving them they were covered up by the blue unit
This is just a guess, but I wonder if its because your using object values in a parent object?
I think that may be it. The way it works is that a movementCheck is spawned and then the tiles do a poxy for that object, and then they send a message to the selected unit. However, the unit receives the message twice which means either two tiles are detecting the movementCheck or something I have no idea about (I checked everything else that could be wrong already)
I know that the game I worked on had discovered a bug with object values and parents so maybe there is another one lol
I think it has to do with the unit dying and the unit moving have the same parent, and they both receive the message but since the dead unit is bugged the parent object gets the message twice
nvm I fixed it lol. The movementCheck just wasn’t being deleted all the time.
but the dead unit still showing it’s info is still there I think that is an actual bug
Edit: I fixed that too actually. So I still think it’s a bug, but I changed it so it doesn’t bug.
I had the global set to in, so since the global is basically always outputting it kept on activating the filter even when the object with the logic was destroyed.
Bam, pinpointed the bug for you @grazer
Grazer can u look at my game i am stuck on how to toggle switch (lvl 2) can u help
and could i get some general Feedback?
Please post your own topic instead of on someone else’s topic
i just put it on general sorry