Skip to content

Should I Raise This as an Issue

I have a set of scripts that are meant to aid in stopping people from destroying poor innocent doors. It is called Fun Doors. All of them as written appear to work just fine. However, a user decided to make a slight edit to one of them that polymorphs anyone who damages the door, that this particular script is attached to, into a chicken for a short period of time. This is the script in question -

// -------------------------------------------------
// : Original NWNscript Poly Penguin// : filename:sc_polydoor
// : Created 30 jun 02 23:40// : Created by Darryl Sandell
// -------------------------------------------------

//::///////////////////////////////////////////////
//:: Name Chicken Door
//:: FileName sc_polydoor03
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////

//:://////////////////////////////////////////////
//:: Modified By: Tarot Redhand
//:: Modified On: 2006
//:: Purpose: When PC damages door they are temporarily polymorphed
//:: into a chicken for 30 seconds (variation on penguin door)
//:://////////////////////////////////////////////

void main()
{
object oPC = GetLastDamager();

if ( GetIsPC( oPC ) )
{
effect epolymorph = EffectPolymorph(POLYMORPH_TYPE_CHICKEN);

ActionWait(0.5);
ActionCastSpellAtObject(SPELL_POLYMORPH_SELF, oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, epolymorph, oPC, 20.0);
AssignCommand(oPC, ClearAllActions());
}
}

The user decided to adapt this so that a chest had this as a trap on a chest. To do so they painted a chest into an area and a attached a slightly modified version of this script to its OnUsed event. To modify the script all they did was to change the line - object oPC = GetLastDamager(); - to - object oPC = GetLastUsedBY); -.

This had definitely unforeseen consequences. Instead of polymorphing into a chicken, as the unedited version does, the PC became a werewolf instead.

So why aren't over at the bug reporting sight already? Well it turns out that this behaviour exists in both 1.69 and EE. So has a legacy bug been discovered? More importantly do I raise this as an issue? Oh, the same thing happens if that line is changed to - object oPC = GetLastOpenedBy(); and attached to the OnOpen event (which is where I suspect the bug resides).

Thanks for any advice.

TR

Comments

  • TarotRedhandTarotRedhand Member Posts: 1,481
    Won't be raising this. Turns out it's some weird timing difference between the various events. Adding a DelayCommand to the ApplyEffectToObject() fixed it.

    TR
    JuliusBorisov
Sign In or Register to comment.