Jump to content

A couple of questions about coding and such


muffin-tacos

Recommended Posts

Yes, I saw that after I had posted my last post. But no worries. I've got a couple of back up prefixes if all else fails. :crazyeyes:

 

OK, what I'm going to ask next is probably a really stupid question, but how do I register a prefix? I've got a link to this site: http://www.blackwyrmlair.net/prefixes/

I don't see any way to register a prefix. Am I just blind or is there no way to register it on that site?

Link to comment

*sigh* Yes, it's me again. (I don't think I'll ever leave this forum.)

 

When my NPC is kicked out of the party, she is supposed to go back to the area where she came from/was found. Would this code work for that?

 

DO ~SetGlobal("FarahKickedOut","GLOBAL",1) EscapeArea() MoveGlobal("AR0709","Farah",[483.838])~ EXIT

or is this better?

 

DO EscapeArea("AR0709","Farah",[483.838]) EXIT

Link to comment

You're better off not using EscapeArea() followed by MoveGlobal(). EscapeAreaMove() accomplishes the job very nicely.

 

This is what the IESDP has to say about EscapeAreaMove()

 

108 EscapeArea()

108 EscapeAreaMove(S:Area*,I:X*,I:Y*,I:Face*)

This action, in its first form, instructs the active creature to leave the current area, either by walking, or, if the path is blocked, by simply disappearing. In the actions second form the action functions as a combination of EscapeAreaDestroy() and MoveBetweenAreas(). The parameters are similar to MoveBetweenAreas(), in that it takes in all the same information, but unlike MoveBetweenAras(), the character will search for the nearest travel trigger, move to that, then execute his movement to the specified area. If he cannot find a travel trigger, he will execute the movement.

 

I use EscapeAreaMove() any time I want an NPC to move from one area to another in something approaching a natural-looking manner.

 

This is from Haldamir:

IF ~~ h2

SAY @8

IF ~~ THEN DO ~SetGlobal("B!HalKicked","GLOBAL",1) ChangeAIScript("",DEFAULT) EscapeAreaMove("AR0709",995,448,2)~ EXIT

END

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...