i did have another question, and it's not strictly related to nwnx_func's ActionUseItemOnObject() so i made a new thread:
i have an item i'm using, and in the OnActivateItem script, i have it do something, just like normal. but i then want it to do it again the next round, too, over and over. i've got something kind of working as follows:
if(sItemTag == "myitem"){
DoSomething();
AssignCommand(oPC, DelayCommand(6.0, ActionUseItemOnObject(oItem, oOther)));
}
this mostly works how i want it to, but i feel it's a hack. is there a better way to do it? some of the problems i have with it are:
- it doesn't have a little "pending action icon in the queue" thing. you just stand there with no queued up actions until 6 seconds go by and you use the item again. not a big deal. i could live with that unless somebody has a better idea.
- but i can't "cancel" the action. if i start running around, i'll still stop and activate the item after 6 seconds, just like i told it to. which then causes another delaycommand, etc. using the "drive" keys (wasd), seems to keep the action from being given, but clicking to move won't stop it. i think this is slightly related to the first issue, that there's no queue of actions to cancel.
i think something like "DetermineCombatRound" is what i'd like, but i'm under the impression that's only for NPCs.
any ideas? thanks!