Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
I need to disable the effects of items suppressed by script:
I tried this: foreach pick in hero from BaseEquip if (each.field[gIsEquip].value <> 0) then each.field[gIsEquip].value = 0 endif nexteach This didn't work because it said it was derived. I also tried these: perform each.assign[Helper.Suppress] perform each.delete[thing.activated] perform each.delete[Helper.ShowSpec] None of these worked either. I think most of the scripts use gIsEquip to apply their effects, so I need a way to change the derived field gIsEquip on other items as long as the effect is activated from the template. It works if I put "trustme" before, but when I remove the template there is nothing to re-equip the items that were unequipped. 1) Is there a better way to temporarily "unequip" an item until an effect causing the unequip event is removed? 2) Is there a way to run a script on the removal of a template? Last edited by risner; December 12th, 2010 at 11:38 AM. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Phase and Priority?
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Right now the template is operating at Pre-Levels/10000 and works at removing the equip check box.
What I can't figure out is how to add the check box again when I remove the template. I tried tagging them and using an adjustment to look for the tag, remove it, and re-equip it. But that doesn't work. |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Can I do something to force a field to be added to all items in a script?
Right now the script adds User.HideItem to each item, then "trustme", changes gIsEquip = 0. I then have an Adjustment look for items items with User.HideItem and if found will "trustme" and gIsEquip = 1. But it doesn't work because when I remove the template, it removes the User.HideItem tag and the script in the adjustment never turns the item back on because it never notices the User.HideItem tag. So I'm back to wondering if there is a way to run something in a script when you remove a template? |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Suppress only works on the things that something bootstraps, not the thing itself, thing.activated is a Pathfinder-only mechanism, and Items aren't specials, so ShowSpec doesn't apply to them.
What unequips an item from the character - I don't know of anything that currently does this? If you're using this to get access to on-off switches, and those aren't real items, use Specials with Activations instead. |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
This rule: any item you carry melds into your form and becomes non-functional I don't know how to implement this without reversing their behaviour by hand or unequipping them by script (better.) The only problem with unequipping is there isn't any way to reequip. It seems anything the script does to modify (the template) to list the items unequipped, gets erased when HL processes the removal of the template that built the list. So the Adjustment I have that bootstrapped a special to hold the unequipped items find the list of unequipped items blank when the template is removed. So nothing to do ;-( |
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
I'd recommend an Eval Rule that complains if things are left equipped, rather than altering the items themselves.
|
#7 |
Thread Tools | |
Display Modes | |
|
|