Jump to content

Some LockScroll/UnlockScroll findings

Recommended Posts

I'm experimenting with LockScroll and UnlockScroll actions recently and I would like to share some findings. Everything is tested on BGEE 2.6.


1. Game crashes when scroll is locked on summoned creature when summon duration expires. It is happening regardless if scroll was locked in creature script, with action override or with CTRL+P cheat key. It happens both for opcode 67 (tested on wizard eye) and opcode 127 (tested with wand of monster summoning).


2. Both actions have some not intuitive behavior during multiplayer game.Let say we have two players, each player controls one character: host controls Player1Fill and other player controls Player2Fill.

From host perspective:
    a. executing  C:Eval('ActionOverride(Player1Fill, LockScroll())') locks host scroll on Player1Fill, other player screen stays with no changes
    b. executing C:Eval('ActionOverride(Player2Fill, LockScroll())') host screen remains with no changes, other player screen is locked on Player2Fill (sic!)
    c. executing C:Eval('UnlockScroll()') when both players screens are locked unlocks it only for host, other player screen stays locked
    d. executing C:Eval('ActionOverride(Player2Fill, UnlockScroll())') when both players screens are locked, unlocks it only for other player, host screen stays locked (this is interesting since UnlockScroll normally doesn't have "active creature").

From other player perspective:
    a. executing  C:Eval('ActionOverride(Player1Fill, LockScroll())') does nothing, it not locks host screen
    b. executing  C:Eval('ActionOverride(Player2Fill, LockScroll())') does nothing, it not locks other player screen
    c. executing C:Eval('UnlockScroll()')  does nothing, both players screens remains locked
    d. executing C:Eval('ActionOverride(Player2Fill, UnlockScroll())') when both players screens are locked does nothing
    e. executing C:Eval('LockScroll()') with hover on Player2Fill locks other player scroll, host screen stays unlocked
    f. executing C:Eval('UnlockScroll()') with hover on Player2Fill unlocks other player scroll, host screen stays locked

Practical implication is that other player engine seems to ignore all UnlockScroll() actions from running scripts, what can potentially break cutscenes.

Edited by marchitek
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...