Skip to content

[Not an Issue] HotKey trigger doesn't work in BALDUR.BCS / BALDUR25.BCS

switswit Member, Translator (NDA) Posts: 495
edited February 2015 in BGII:EE Bugs (v1.3.2064)
How to reproduce:
1. Add following code into BALDUR.BCS and BALDUR25.BCS:

IF
HotKey(F)
THEN
RESPONSE #100
DisplayStringHead(Player1,1) // No, I'm sorry, none of them sound familiar.
END

2. Start new ToB game choosing any character.
3. Press F key.

What it does in BG:EE and BG2:EE - nothing shows up in game.
How it should behave - string should show up just like in vanilla engine.

I've tested it in scripts attached to party member - there it works. But HotKey trigger is broken when used in global scripts. There is still a workaround that can be used (DPLAYER3.BCS), but it doesn't work when AI is off and this is still regression compared to vanilla game. I've tried adding NextTriggerObject(Player1), but it doesn't fix it either.
Post edited by Gate70 on

Comments

  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited February 2015
    This is because the Hotkey trigger is sent to the creature(s) currently selected, you can use it only in a creature script.
    There are a lot of triggers that are sent to specific objects, thus wouldn't work in arbitrary scripts. These triggers i call 'fire and forget trigger', these triggers 'go away' after being caught. The other type of triggers 'status triggers' would work anywhere and anytime. You can tell the two types apart easily by looking at their trigger id in trigger.ids.
    Status trigger ids start with 0x4.


    I forgot to add, vanilla works the same way.
  • Gate70Gate70 Member, Developer Posts: 3,883
    Closing
This discussion has been closed.