Jump to content


Cursed_One

Member Since 18 Aug 2004
Offline Last Active Jun 03 2009 02:51 AM

Topics I've Started

Problem in BG2's script edit

18 August 2004 - 04:49 AM

Hello everybody.I got a problem in BG2 script edition.

I wrote a script in order to do this effect: when a bountyhunter is in shadow(hide in shadow/invisible/improved invisibility),auto cast spell zshl01.spl on him;when he is not in shadow,auto cast zshl01e.spl on him.

----------------------------------------

IF
Global("zshl01","GLOBAL",0)
Kit(Player1,BOUNTYHUNTER)
OR(2)
StateCheck(Player1,STATE_INVISIBLE)
StateCheck(Player1,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
ApplySpellRES("zshl01",Player1)
SetGlobal("zshl01","GLOBAL",11)
Continue()
END

IF
Global("zshl01","GLOBAL",11)
!StateCheck(Player1,STATE_INVISIBLE)
!StateCheck(Player1,STATE_IMPROVEDINVISIBILITY)
THEN
RESPONSE #100
ApplySpellRES("zshl01e",Player1)
SetGlobal("zshl01","GLOBAL",0)
Continue()
END

-----------------------------------------

But it does not work.So I change

Kit(Player1,BOUNTYHUNTER)

into

Class(Player1,THIEF_ALL)

And it works!Of course,to all thieves.

What is my problem?How to use the trigger "Kit(O:Object*,I:Kit*KIT)"?

Thanks!Forgive my poor English knowledge. :wall: