Jump to content

Scripts in Area Triggers do not accept "[PC]"?


jastey

Recommended Posts

I'm adding script blocks to SoD's bdrom01.bcs which should be triggered by any party-related creature, hence I am using [PC] for detection. But neither "Detect([PC])", "IsOverMe([PC])", nor "Range([PC],20)" makes the script do anything if my party is on it.

Is this a known thing or am I doing something wrong?

 

IsOverMe(Player1) works.

I could live with an OR(6) for all party members, but I know there are area trigger scripts in BGII that use "Detect([PC]) Range([PC],20)" (for example "VAMPSTTP.bcs") so I thought it should be a valid trigger if I also want familiars or charmed creatures to activate the trigger.

Link to comment
Is this a known thing or am I doing something wrong?

 

Yes, some of SoD's romance triggers have visibility issues.

Dynamic objects like [PC] or [GOODCUTOFF] require them to be within script owner's direct line of sight to return true. With doors and ground triggers the script's coordinates are at the center of bounding box, so with very large triggers or obstacles over them it's possible for script to not see the entire trigger's area. Or for a door to be blind on its southern side.

 

Use static objects, like PlayerX or death variable name. If you need it to be any friendly creature, however, then it might get complicated, because as David says you do need a wildcard to match them. I could suggest to split the trigger into few smaller ones, sharing the script. It might be possible to activate both parts of it simultaneously, so to avoid duplication you may need to move the desired action into area script and have the trigger only set the activation variable.

Edited by Ardanis
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...