Jump to content

Recommended Posts

I made an NPC with the following script:

Begin DisabledNPCScript

    short done

        if (done==0)
            set done to 1

End DisabledNPCScript

Then I made a door, which, once activated, will enable the NPC.

I gave it the following script:

Begin EnableDisabledNPC

    short done
        if (done==1)

        if ( OnActivate == 1 )

End EnableDisabledNPC

The game complains about the "EXPRESSION" and "Right Eval" which means that "OnActivate" is an incorrect expression and that it's also not defined in the script.

What am I supposed to define it as? It's neither a short, nor a float.


Or is OnActivate simply just broken?

Link to comment
Share on other sites

  • 2 weeks later...

are you referencing "done == 1" in the door script from the npc script? if so, this is a local variable, and can only be referenced inside the same script. you can use global variables to circumvent this.


instead of enable you could also use PositionCell to teleport the npc from a "npc holding cell" this would only require a script on the door. (not 100% sure, maybe even possible with one script and enable)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...