These are some notes I included in the BP Series changelog, but I thought some scriptors might find it handy. This is far from a complete list of new functions; one is new, one has been there since BG2 but hidden in code. Please, feel free to add more insights to this thread, dev's and modders alike. Nicer to keep them in one place, if possible. :-)
1 set of NextTriggerObject & Conditional Check = 1 count of OR
This also works in an OR() function, and does not require an extra count on the OR's.SCRIPTORS: Look for the new ACTION.IDS entry described above, installed by BP Series:
34 UseItemExt(S:Item*,O:Object,I:Slot*SLOTS,I:Abil*)
--First 2 entries, just like UseItem("potn08",Myself). Slot set to 0 by default, means Any Slot. Haven't tested non-zero. Ability is the item extended effect number (0=main,1,2). Works for weapons and also items with > 1 ability.
This works in BG:EE, BG2:EE, and BG2:ToB (the code was there all along, who knew until now?) *Thanks go out to Avenger_TeamBG, for this fine discovery!*
You can add this on your own, or to your own mod as you desire. Hopefully by posting it here, we can keep the same nomenclature between mods. It gets messy when you have > 1 name for the same function. This might be officially added to EE some day (???), but for now here it is.
TRIGGER.IDS (Available in BG2:EE, installed by default)
0x40E0 NextTriggerObject(O:Object*)
This is a VERY handy function. It allows you to check things like Globals, Range, etc etc on another creature! Things are now possible, that could only be dreamt of before. And there may be more goodies to come, in the future.
Example of use:
IF
HaveSpell(WIZARD_FIREBALL) // Locked & loaded
See(NearestEnemyOf(Myself)) // My fireball target, there they are
!Range(NearestEnemyOf(Myself),15) // Am I w/in the fireball's range?
NextTriggerObject(SecondNearestMyGroupOfType([PC])) //My second nearest buddy
!Range(NearestEnemyOf(Myself),15) //Is my buddy in fireball range?
THEN
RESPONSE #100
Spell(NearestEnemyOf(Myself),WIZARD_FIREBALL) //Blast them!
END
1 set of NextTriggerObject & Conditional Check = 1 count of OR









