Redcap's Corner
Well-known member
I have two class special abilities: cEnsEnsp and cEnsSpForm. cEnsEnsp has an array with a checkbox (field: usrIsCheck). cEnsSpForm has a normal activation checkbox (field: abilActive). Everytime a user selects one of these abilities, I want it to deselect the other. In other words, if hero.child[cEnsEnsp].field[usrIsCheck].value = 1 then hero.child[cEnsSpForm].field[abilActive].value = 0, and vice versa.
I'm using the following code for cEnsEnsp:
And I'm using the following code for cEnsSpForm:
And I'm getting the following error: "Only derived fields can generally be modified via scripts". Am I using "trustme" incorrectly? How can I get this to work?
Mind you, I don't want selecting one ability to disable the other, merely deselect it. It's possible to use neither of these abilities, but it's not possible to use both of them simultaneously, so I can't just use a single checkbox that toggles the two abilities. But if each one disables the other, then the user has to deselect one before he or she can select the other, and I want to reduce the number of clicks the user has to make.
I'm using the following code for cEnsEnsp:
Code:
doneif (field[usrIsCheck].value = 0)
hero.child[cEnsSpForm].field[abilActive].value = 0
trustme
And I'm using the following code for cEnsSpForm:
Code:
doneif (field[abilActive].value = 0)
hero.child[cEnsEnsp].field[usrIsCheck].value = 0
trustme
And I'm getting the following error: "Only derived fields can generally be modified via scripts". Am I using "trustme" incorrectly? How can I get this to work?
Mind you, I don't want selecting one ability to disable the other, merely deselect it. It's possible to use neither of these abilities, but it's not possible to use both of them simultaneously, so I can't just use a single checkbox that toggles the two abilities. But if each one disables the other, then the user has to deselect one before he or she can select the other, and I want to reduce the number of clicks the user has to make.