Change an item's holdable state
Is there a way to switch an item/weapon's state from holdable="yes" to holdable="no"?
Specially, I have a magic weapon power that would need to make the chosen weapon no longer able to be put into bags, i.e. it becomes holdable="no".
I have tried the following (on the item power) but no good. Get the error I have an undeclared variable 'state'
Is there a way to switch an item/weapon's state from holdable="yes" to holdable="no"?
Specially, I have a magic weapon power that would need to make the chosen weapon no longer able to be put into bags, i.e. it becomes holdable="no".
I have tried the following (on the item power) but no good. Get the error I have an undeclared variable 'state'
Code:
~ make user proficient and weapon natural
if (parent.tagis[component.BaseWep] <> 0) then
perform parent.assign[Helper.Proficient]
perform parent.assign[wFtrGroup.Natural]
perform parent.assign[wGroup.Natural]
perform parent.setfocus
perform state.focus.amendthing[holdable,"no"]
perform state.clearfocus
else
foreach pick in hero from BaseWep where container.child[gCustMagic].field[gWeapExpr].text
perform eachpick.assign[Helper.Proficient]
perform eachpick.assign[wFtrGroup.Natural]
perform eachpick.assign[wGroup.Natural]
perform eachpick.setfocus
perform state.focus.amendthing[holdable,"no"]
perform state.clearfocus
nexteach
endif
Last edited: