While trying to create a hat that was scripted to automatically equip itself when picked up, I found a strange glitch. It does equip, but still remains in the player's hands if it goes into any slot of the hotbar. It makes it look as if there are 2 of the item. When it is active in the player's hands, they can press X to drop it. This removes the one from the player's head, but not the one from their hands. BUT there is nothing left in the inventory, and pressing X will not drop another hat. It also does not trigger the "Item Removed From Inventory" event in the hat (or in an Event Listener). If I manually unequip it and move it into Inventory, then drop it, the script triggers correctly.
It's a strange error. Maybe the video can explain better:
It happens with anything equipped on the body.
Event Listener also does not detect item dropped directly from being equipped on the body.
Attaching all logs, and the test scenario shown in the video (with a couple more test items added to it).
While trying to create a hat that was scripted to automatically equip itself when picked up, I found a strange glitch. It does equip, but still remains in the player's hands if it goes into any slot of the hotbar. It makes it look as if there are 2 of the item. When it is active in the player's hands, they can press X to drop it. This removes the one from the player's head, but not the one from their hands. BUT there is nothing left in the inventory, and pressing X will not drop another hat. It also does not trigger the "Item Removed From Inventory" event in the hat (or in an Event Listener). If I manually unequip it and move it into Inventory, then drop it, the script triggers correctly.
It's a strange error. Maybe the video can explain better:
It happens with anything equipped on the body.
Event Listener also does not detect item dropped directly from being equipped on the body.
Attaching all logs, and the test scenario shown in the video (with a couple more test items added to it).
output_log.txt
output_log_clean.txt
output_log_game.txt
MY_GAME_NAME(8).zip
Share this post
Link to post
Share on other sites