Ganguro Posted February 20, 2022 Share Posted February 20, 2022 I made an NPC with the following script: Begin DisabledNPCScript short done if (done==0) disable set done to 1 endif End DisabledNPCScriptThen I made a door, which, once activated, will enable the NPC.I gave it the following script: Begin EnableDisabledNPC short done if (done==1) return endif if ( OnActivate == 1 ) DisabledNPC->Enable Activate endif End EnableDisabledNPCThe 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?Help! Link to comment Share on other sites More sharing options...
abot Posted February 22, 2022 Share Posted February 22, 2022 spacing is important, try this: if ( done == 1 ) Link to comment Share on other sites More sharing options...
FIMzzZzz Posted March 3, 2022 Share Posted March 3, 2022 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 More sharing options...
Recommended Posts