Reproducible version
AGMaker 1.0.13 Problem description
While attempting to implement item pickup functionality, I encountered an interesting bug. When I linked three actions (idle state → print message → self-destruct) in sequence, the item would start following the player upon contact. Subsequently, the game would freeze and crash. Reproduction steps
Download the attachment, unzip it, import the project, and press F5 to run.
Move left and right with A and D, and touch the item.
According to the written steps, I can make the item follow the player, but the game does not freeze or crash. Can you reproduce this issue 100% of the time?
I found that adding operations on the user database during the handling of items, such as making it equal to a variable of another object, would increase the probability of a crash.
I think so. Actually, there are mainly two issues:
I didn’t set the nodes to move along with the players, but this effect is triggered for unknown reasons. However, the problem will be resolved by canceling the self-disappearing action of the corresponding object in the project file.
Regarding the issue that user database operations can cause the game to crash: originally, I used three actions to write to the user database to simulate the action of items being put into the backpack. But during the test, when touching the items, I found that the entire interface, including the editor, couldn’t be clicked. Later, as I gradually deleted these actions, the probability of crashing decreased.