Jump to content

Photo

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


4 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 06 October 2018 - 12:34 PM

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.



#2 DavidW

DavidW
  • Gibberlings
  • 4512 posts
  • Gender:Male

Posted 06 October 2018 - 01:43 PM

Why it’s not triggering, I’ve no idea. But use [GOODCUTOFF] rather than [PC] if you want to catch allies.

#3 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6786 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 06 October 2018 - 02:27 PM

Isn't [PC] just the Player Character, not his allies ?


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#4 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2613 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 06 October 2018 - 02:41 PM

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, 06 October 2018 - 02:47 PM.

Retired from modding.


#5 jastey

jastey
  • Gibberlings
  • 7472 posts
  • Gender:Female

Posted 07 October 2018 - 12:14 AM

Thank you all for the info!

I didn't know about the visibility issues due to the huge trigger areas. So far, using OR(6) Player1-6 works for my purpose, and that's also acceptable.





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users