Issue with Spellbook and Disabling Abilities

Level 4
Joined
Oct 25, 2014
Messages
23
Recently, the "Player - Enable/Disable Ability" function has stopped working for me in relation to the Spellbook ability. Usually, how it works is that you can enable and disable spells, and it will also work within the Spellbook.

The system I have involves picking up/dropping items to enable/disable Spells in the Spellbook. Picking up an item works fine and enables the spell, but dropping it no longer disables the spell.

I was wondering if anyone else has experienced any issue similar to mine? Worth noting that this used to work recently. The function seems to work fine on its own, but not when used together with the spellbook.

Thanks in advance.
 
Level 4
Joined
Oct 25, 2014
Messages
23
This is a simplified version of the trigger in a test map. I think that the issue is not with the function itself, but the condition on the lost item trigger: (LosingItemHero has item of type LostItemType) Equal to False". The condition is there to make sure that if you have two of the same spell item (Entangling Roots), it shouldn't disable the spell if you still have one in your inventory.

I think I will give it a try to use conditions that check each inventory slot for the same item and see if that works instead, but I am not sure why that condition is so problematic and why the game thinks you still have an item of that type, even if you're losing it.

I will also attach the test map I've made for this purpose.


Spellbook equip item.png
Spellbook drop item.png
 

Attachments

  • Spellbook Test.w3m
    18.8 KB · Views: 5
Level 4
Joined
Oct 25, 2014
Messages
23
Have you tried adding a very short Wait before the If in the Dropping Item trigger? There are some weird interactions with item manipulation and the state of being in and out of the inventory at the same time
Yes, this seemed to have fixed it. Strange, since the trigger worked fine once upon a time. Not sure if I want to put in waits there, since I am not sure how well Wait functions work in multiplayer. Thanks though!
 
Top