Hi,
I am not sure how to properly phrase this so I’ll do my best to explain. The scene below works for a very specific NPC in a very specific room. But I have a grid of rooms and two other NPCs sprinkled about. The PC can use the potion on any of the NPCs but only once. Can I re-write this scene to apply to any room/NPC that the PC might enter first?
I’ve looked for a way to start the scene when the PC is in the same room as one of the NPCs, because it is impossible to predict which room the PC will enter first, but I haven’t had any luck.
I do move the potion to nil after it is used, so I suppose I could duplicate this scene for the other two NPCs, I just thought there might a better way.
//encounter Fafnir scene
sky2CScene: Scene
startsWhen = (me.isIn(sky2C))
endsWhen = (gActionIs(Pour))
whenStarting(){
"The terrible dragon Fafnir is here, preventing you from going any farther. ";
if(!potion.isIn(me))
{
"With nothing to use against Fafnir, you meet your untimely demise. ";
finishGameMsg('Please do try again. ',ftDeath);
}
}
;
Yes and no. I don’t think I got the condition for the scene to start quite right.
And as I was messing with that I realized I have an afterAction() in each of the rooms that have the NPCs in them to finish off the scene.
So I do have everything working by duplicating the scene code based on which NPC and Room the PC is in. That will work for me for now.
Thank you for checking! I might explore this more a bit later.