Jump to content

Detecting an area transition trigger


Diana

Recommended Posts

Scenario: Party is in the tavern in Ust Natha. There is the transition trigger in-game for going downstairs to the lust chambers and where the captured members of House DeVir are held.

 

What scripting trigger would one use to simply detect this trigger to go downstairs to the next level but not actually make the transition? I don't think DETECT() would work, or would it?

 

Thanks.

Link to comment

Thanks people - in the case of an 'invisible creature' how can one can do a range check on something invisible :)

 

For this purpose, a compound object is an actor, door, container, or trigger object. YMMV.
Going to see if Detect() or See() will work with the trigger name. Had thought Detect worked only for traps.

 

BTW - what does YMMV stand for?

Link to comment

"Your mileage may vary."

 

In this context, I know that most of these triggers will work with doors and containers and actors, but I've only tried a couple with trigger objects (in theory, any object that can run a script should work for them). So you may have to do a bit of testing and tweaking to get something that really works the way you want.

Link to comment

Well, I tried Detect("Trans2203") which is what DLTCEP (if I got the acronym correct) tells me is the transition from Area 2202 to 2203. What I got is a crash to the desktop. I can try the suggestion of creating an invisble creature at the transition point and see what happens.

 

What I am really trying to do is have this one NPC issue a warning that he cannot make the transition because he'll be killed on arrival at the nexst level so that is why I need to detect the transition point. If it was a door - it would be more simpler (I think)

 

Edited to add: Found a workaround - drow handmaidens/priestesses don't turn hostile immediately. Just did a simple Global with an Area Check, then cast Wizard_Improved_Invisibility upon entering the area on the NPC since he and the party will not be engaging in battle. Will have to reset the variable when we leave it in case we decide to come back for more quests, but that will take care of the problem.

Link to comment
Well, I tried Detect("Trans2203") which is what DLTCEP (if I got the acronym correct) tells me is the transition from Area 2202 to 2203. What I got is a crash to the desktop.
Ouch. That definitely shouldn't happen. The trigger name is "Tran2203," but it still shouldn't crash.

 

I just tried this snippet, and it works perfectly:

IF
 AreaCheck("AR2202")
 Range("Tran2203",20)
 See("Tran2203")
THEN
 RESPONSE #100
   DisplayStringHead(Myself,1) // No, I'm sorry, none of them sound familiar.
END

I added it to default.bs -- moving Imoen close to the stair caused her to continuously run the string. I changed See() to Detect(), and it still works perfectly.

Link to comment

Thanks - I'll give it a shot later today as I have to get ready for work. This will help out in a lot of instances.

 

Had a few minutes before leaving - still crashed to the desktop the minute I added a similar block whether it be to the npc's .baf or default.bs.

 

Could be something has become corrupted in my game. Have to check later if I crash if I do a check for a door as well.

 

8:13 pm - definitely something has become corrupted. If I try the code in a recompiled .baf, I get a crash. I remove the code and recompile and clear the game cache, the crash persists. Only way to continue was to delete all files referencing AR2202 and AR2203 from Override. Have to see if this happens again when I re-install the game.

 

Edit: 2/24/06 - After deleting the AR2202 and AR2203 I tried devSin's suggestion again but this time on Lolth's temple and it worked!!! Thank you! So it was a corrupted Area file that kept crashing my game.

Link to comment

Archived

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

×
×
  • Create New...