so the script works and compiles but the beams won't shut off and the peaceables are still useable. i've tried messing with this myself and only get compile errors. anyone see what i missed and can help?
so the script works and compiles but the beams won't shut off and the peaceables are still useable. i've tried messing with this myself and only get compile errors. anyone see what i missed and can help?
Are you getting any scripting errors with either ap_pillar_summon or ap_rune_pillar?
Am I right in saying that the above script is attached to each of the following
rune_evil
rune_fire
rune_holy
rune_ice
If thats the case, then the reason your placeable remains usable is because the line to disable it lies within the if statement to check if they are ALL activated.
Eg: You will probably find that the 4th rune tower/object you use does actually disable itself.
if(GetLocalInt(GetObjectByTag("rune_ice"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_fire"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_evil"), "Activated") == 1 &&
GetLocalInt(GetObjectByTag("rune_holy"), "Activated") == 1)
{
SetLocalObject(oTarget, "PC", oPC);
ExecuteScript("ap_rune_pillar", oTarget);
ExecuteScript("ap_pillar_summon", OBJECT_SELF);
SetUseableFlag(OBJECT_SELF, FALSE);
DelayCommand(900.0, SetUseableFlag(OBJECT_SELF, TRUE));
}
From the snippet above, it looks like it will only set the usable flag to be False, if all 4 pillars are activated.
This will not happen within the context of a single use of the script
As such, you will find the 4th pillar gets disabled, while the 3 that came before it remain enabled.
To fix it, you should set the usable flag to be false, outside of the If Statement, around where the vfx is applied
Also , you have got your vfx being applied permanently, which is why the beams persist.
If you want to remove the beams, you will need to apply the following function to the beams target object.
http://www.nwnlexico...oveEffectOfType
I recommend calling it with EFFECT_TYPE_VISUALEFFECT
As a consequence, this will remove ALL visual effects from the target of the beams, not just the beams themselves.
There is also the possibility that the beam effect may be being applied after you are scheduling to remove it.
WhiZard -
both ap_rune_pillar and ap_pillar_summon work fine.
the beams show activation one at a time when each rune stone is used.
gonna guess that being set on after is not the issue.
Baaleos -
yes, each of the 4 rune stones have this script in the OnUsed tab.
they are activated one at a time emitting a beam to a 5th rune stone,
which then sends a final beam to a rune pillar, thus summoning the guardian.
i noticed when i tested the process again the 5th beam dose not show,
would this possibly make the other beams stay on??
as for the script itself, it was made by shadow or lightfoot some time ago, as i'm not so much a scripter.
i've learned how to read script and can understand what most does,
but reproducing it is another story, as i stated originally with all my compile errors i got messing with it myself.
i will however try to figure it out myself if help is not available here.
i do hope that help is still available on these forums,
tho i'm sure it's not as abundant as it once was on the old forums.
ok, here is the full set.
ap_rune_chain
You have created the beam effect on the four runes, and are trying to remove the visual effects from the black rune. The beam connects the four runes to the black rune but the effect is found on the four runes, not on the black rune.
Well spotted - because it went onto the next line, I missed that bit
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectBeam(nBeam, GetObjectByTag("rune_black"), BODY_NODE_CHEST), GetObjectByTag(sTag));
You are applying this effect to each pillar.
Instead of applying to each pillar, you could swap it round, to make it apply it to the rune_black target. This would be the path of least resistance, since the beams will more a less look identical whether they are coming from or going to the rune_black.
It should also allow the existing code to remove the beams.
Try changing the above line to be
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectBeam(nBeam, OBJECT_SELF, BODY_NODE_CHEST),GetObjectByTag("rune_black"));
same results, fire, ice, divine, evil...
still showing no black and all runes are still usable with beams still on.
is this: DURATION_TYPE_PERMANENT causing the beams to stay on?
should it be this: DURATION_TYPE_TEMPORARY??
just a thought, my logic would think they should only be temporary....
i don't know if it would make a difference, but will still try just to cover that base.
.
EDIT: found out what temporary does... makes it so nothing shows...
put it back to permanent.
Can you put the following line within the ap_rune_pillar
script and re-test so we can see where it is running
SpeakString("01-Got here");
Change 01 to be a new number each time.
This will let us know if the script is firing, and where it is going in the logic
would be happy to, anywhere in particular?
.
please keep in mind i'm not a scripter and debugging definitely is not my strong suit.