Hopelessly Stuck
Zephirius
Member Posts: 419
I'm sure I'm in the ballpark on this one, but am having a time of it.
I'm just trying to have the PC cast color spray on a loom placeable and an effect will occur, otherwise you'll get some floaty text...
Thing is, it has to be color spray for the effect to work. As is this script wont fire. But (say I replace color spray with dispel magic) it works just fine.???
A nudge in the right direction would be very helpful. As is, I'm pulling my hair out!
I'm just trying to have the PC cast color spray on a loom placeable and an effect will occur, otherwise you'll get some floaty text...
object oObject; void main() { int nSpell = GetLastSpell(); object oPC = GetLastSpellCaster(); if (GetIsPC(oPC) && (nSpell == SPELL_COLOR_SPRAY)) { oObject = GetObjectByTag("LOOM_FX"); effect eFX = EffectVisualEffect(VFX_IMP_GLOBE_USE); DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFX, oObject)); } else { FloatingTextStringOnCreature("Inadequate Incantation!", oPC); } }
Thing is, it has to be color spray for the effect to work. As is this script wont fire. But (say I replace color spray with dispel magic) it works just fine.???
A nudge in the right direction would be very helpful. As is, I'm pulling my hair out!
0
Comments
Another option would be to try to modify the color spray nss file. (NW_S0_ColSpray.nss)
Looking though the code it only really triggers if object is hostile:
Try setting the placeable to 'hostile' and see if that helps. If not, maybe a hack like this would work:
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) || GetTag(oTarget) == "MY_LOOM_TAG")
{
FloatingTextStringOnCreature("Inadequate Incantation!", oPC);
}
If you just want to alter the spell and include the Loom information in it then you could do something like the following. It is the original script with the changes to "GetFirstObjectInShape" and "GetNextObjectInShape" to include placeables as well as a few lines to only effect a placeable with the tag "LOOM", but you can change that to whatever tag you are using: