why isnt my sword equipping working. I can equip the sword but not unequip it. Here is my sword equpping code.
My full code:
why isnt my sword equipping working. I can equip the sword but not unequip it. Here is my sword equpping code.
My full code:
Not related to your issue, but something you should change - you do not need to Repeat for each object and test if a click happened on it. This is not the optimal and most efficient way to use GDevelop. When you check for a touch on items, GDevelop will then only use the item object(s) that meet that condition in’that event and it’s subevents; it effectively filters the usage of items to just the one that matches the condition.
So, get rid of that “Repeat for each instance of items
” event, but keep those other events.
A quick fix would be to add the two green conditions. This would ensure only one of the events are actioned, not both.
thanks a lot, it works now