Jump to content

I don't understand a trigger


DrAzTiK

Recommended Posts

IF

See([0.0.0.0.151])

Name("ppgith",Myself)

Global("flee","LOCALS",0)

THEN

RESPONSE #100

SetGlobal("flee","LOCALS",1)

StartDialogueNoSet(Player1)

END

 

===> IF

See([0.0.0.0.151])

 

What is this trigger? I don't understand.

 

Ty

Link to comment

Objects in BG2 are of the type EA.GENERAL.RACE.CLASS.SPECIFICS.GENDER.ALIGN. That trigger returns true if any actor with Specifics 151 (defined in the CRE file) is visible to the caller (i.e., do I see any of those sahuagin in this case).

 

Specifics usually doesn't resolve to anything because they just picked numbers at random (and there are only a few entries in the IDS). The specifics value is also used for group matching (e.g., InMyGroup() or NearestMyGroupOfType).

 

Examples:

See([128]) // EA.IDS = 128 NEUTRAL = See() any EA NEUTRAL actor

See([0.1.2]) // GENERAL.IDS = 1 HUMANOID, RACE.IDS = 2 ELF = See() any HUMANOID ELF actor

See([0.0.0.0.0.2]) // GENDER.IDS = 2 FEMALE = show me the ladies

 

Our compilers resolve the IDS references, but if the value doesn't map to any IDS symbol (as is usually the case with Specifics), then you just get the number (it's all just numbers in the BCS code).

Link to comment

Archived

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

×
×
  • Create New...