Jump to content

Range check through area script


Kulyok

Recommended Posts

My situation is:

 

I need the character to initiate dialogue with PC upon sight\hitting certain range. However, the character is unselectable and disabled = their script will not run.

 

So, I am trying to do this via an Area script, but there's no appropriate trigger for two characters seeing each other. Or, at least, I haven't found any, and I tried.

PC is not necessarily the active CRE, so regular See() and Range() will not work.

 

What do I do?

Link to comment

It wouldn't work all that well, I'm afraid, since I cannot know the exact location of my unselectable creature... character - roughly speaking, this "unselecting" thingy will happen anywhere in the area. Sigh. I thought it would be easier, but it seems that I will have to go with a cheesy approach. Ah well. Good to know I went as far as to actually find the engine has limitations, I suppose.

Link to comment

@ Kulyok:

 

CreateCreature("<crename>",[-1.-1],<face>)

 

You could carry out this command to create the invisible creature before making the NPC unselectable. It should spawn next to the NPC. Then:

 

IF

See([PC])

Range(<rangecheck>)

THEN

RESPONSE #100

Dialogue(Protagonist)

END

 

on the invisible cre should work.

 

-Y-

Link to comment
I am guessing that cutscene spies are undetectable? But if not, I wonder if an item which grants non-detection can be added to the CRE as unsteallable, undroppable sort?

 

I am not sure that complete non-detection is possible, unfortunately. High-level dispel + a paranoid player castng Detect Evil on the area + casting a cloudkill (there will be a "InvisCre-magic resistance" message every round) - I am not sure that I am comfortable with it.

 

As for cutscene spy thing - well, I since this invisible creature is possibly going to be in the game for up to an hour (who knows these players), then, yeah, it's pretty tough.

 

 

I guess I'll just compare this InvisCre approach with the one I made yesterday at 3am (pulling another cutscene, fading the screen to black and quietly bringing PC and disabled character together) and see what is better. (Though *anything* is better than the code created by Kulyok at 3am, I assure you. :) )

Link to comment

Well, your CRE will have some sort of dialogue name, like a "dead body". As a player I will have no problems with my paladin detecting the 'dead body' - Nonevil/Evil whatever; or seeing the 'dead body' Magic Resistance...

Link to comment

Archived

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

×
×
  • Create New...