Jump to content


Photo

alignment checks


  • Please log in to reply
4 replies to this topic

#1 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 16 August 2004 - 02:49 AM

I want to script in an alignment check for my NPC romance. I have it check for alignment when setting the RA to 1 in the first place, but if the PC's alignment changes for any reason, I want the romance to end. The question is, how can I do this without causing the infamous stutter bug? Will the following code, placed in the NPC's .baf, work?

IF
!Alignment(Player1,MASK_GOOD)
OR(2)
Global("TsujathaRomanceActive","GLOBAL",1)
Global("TsujathaRomanceActive","GLOBAL",2)
THEN
RESPONSE #100
DO ~SetGlobal("TsujathaRomanceActive","GLOBAL",3)
END


Thanks!

Sillara
Check out my RPG forum!

#2 Vlasák

Vlasák
  • Member
  • 51 posts

Posted 16 August 2004 - 04:49 AM

It should work... if this block is triggered the variable is set to 3 and this ensures that the script is proceeded just once (it runs just for values 1 or 2).
Baldur's Gate II add-on CZ - TC from Dalelands
http://addoncz.gamestar.cz

English forums are opened!

#3 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 16 August 2004 - 06:38 AM

Thanks! I'll try it.

Sillara
Check out my RPG forum!

#4 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 16 August 2004 - 07:24 AM

Actually, that won't work exactly as typed.

DO ~SetGlobal("TsujathaRomanceActive","GLOBAL",3)

Will not work in BAF files. Use just
SetGlobal("TsujathaRomanceActive","GLOBAL",3)
if you want to make the romance only PC's that are not good-aligned.
Home of Kitanya, Improved Asylum, more...

Posted Image

#5 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 16 August 2004 - 07:46 AM

Umm, yes. That is what I meant. :turnip: :unsure: But it ought, I think, to mean that ONLY good-aligned PCs can romance. Right?

Sillara
Check out my RPG forum!