Jump to content

Recommended Posts

Posted

Okay, I should have explained more clearly. What I meant was that as far as the script calls are concerned, being in combat overrides being in town, so the two calls results are mutually exclusive. Alternatively, the calls should be interpreted as (is_town()==1) => (in town but not in combat and (is_combat()==1) => (in town and in combat).

 

If, however, the item isn't dropping, you have something else stranger going on.

  • 2 weeks later...
Posted

Well, the correct script is assigned - I put a print_str in the START_STATE, and it showed up every move until I got him to join. The DEAD_STATE, however, refuses to be called. It doesn't matter whether I'm in combat or not; the print_str I placed in the DEAD_STATE does not appear. And it's particularly confusing because I know it worked once.

 

 

...and, huh. It works if I leave the town and return. That's odd. shocked

Posted

You've got the script set to run every turn, right? Even if that wasn't the case, though, I expect that's not the problem.

 

So I remember that there was some mystery as to how to get an NPC to run a special script when the NPC had joined the party, and it turned out that you had to edit basicnpc.

 

I'd guess that when an NPC has a non-default script, that's fine. But when the NPC joins the party, it has to do different stuff; it doesn't mindlessly wander like a basicnpc, it follows the party. But the prt_str in the START_STATE shows that NPCs still run their non-default script. Maybe... maybe when an NPC in the party dies, BoA doesn't call the non-default script's DEAD_STATE. Maybe it just calls the basicnpc's DEAD_STATE.

 

I would set the NPC's character ID and include a check in the basicnpc's DEAD_STATE to see if it's that character ID. If so, print a thing. Maybe that will work.

Posted

The documentation explicitly states that the DEAD_STATE is called in the creature's script, and it even works once I leave town. However, if it dies before I leave town, it does not work. Still... your suggestion may be worth investigation...

 

Note that the print_str in the START_STATE only printed until it joined the party, by the way. After it was in the party, it no longer printed (as expected).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...