Avenger Posted June 13, 2005 Posted June 13, 2005 The region link field is 32 bytes long (it is the scripting name of a trigger region). The dialog resref and name strref in doors are either nonexistent, or follow these 32 bytes. (there are just enough bytes left in the door struct). The relevant part of the door struct: short locp1x, locp1y; //open location 1 short locp2x, locp2y; //open location 2 long strref; //check this for missing strings STRREF!!! char regionlink[32]; long nameref; //this is unsure char dialogref[8]; //also unsure AttachTransitionToDoor("travelregion","door01") This action would link door01 (scripting name) to the "travelregion", this means, that the travel region is unusable when the door is closed.
Galactygon Posted June 13, 2005 Posted June 13, 2005 So would that prevent fleeing creatures from entering a house with a closed door? -Galactygon
SimDing0 Posted June 13, 2005 Posted June 13, 2005 That's a good idea actually. (Although it might lead to a greater abundance of "standing on the spot for 5 seconds before vanishing".)
Guest avenger_work Posted June 14, 2005 Posted June 14, 2005 You can prevent npcs leaving an area by setting the travel region unusable for npcs. That's already used in DLTC
devSin Posted June 14, 2005 Posted June 14, 2005 (Although it might lead to a greater abundance of "standing on the spot for 5 seconds before vanishing".)It will, since EscapeArea() will take the character to the nearest passable transition. You could try EscapeAreaNoSee(), but I have no idea what this would do (the only logical explanation I could come up with was that NoSee() simply gets the character out of visual range, instead of trying to find a valid transition to have the object move to; I haven't ever gotten around to testing the behavior, though).
Avenger Posted June 14, 2005 Author Posted June 14, 2005 You can prevent npcs leaving an area by setting the travel region unusable for npcs.That's already used in DLTC <{POST_SNAPBACK}> Hmm, actually i'm not sure if that works for escapearea, maybe not
devSin Posted June 14, 2005 Posted June 14, 2005 The "not passable by NPC" flag will force the object to find another transition for EscapeArea(). If one is not close enough, or cannot be found, the object will not move (it will simply be removed from the area after the mandatory waiting period). Hmm, actually i'm not sure if that works for escapearea, maybe notSince EscapeArea() just destroys the current instance of the object (moving anywhere is just for effect), I'm not quite sure what you're talking about. The impassable flag will prevent the object from moving through the transition (either an enemy following GOODCUTOFF, or RunAwayFrom(), or whatever other nonsense lets NPCs move through area transitions).
Recommended Posts
Archived
This topic is now archived and is closed to further replies.