A scripting command to shake the screen

Discussion in 'General Modification' started by Agetian, Oct 1, 2005.

Remove all ads!
  1. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    Hmm... While trying to dig up a command that would play a NPC animation for Ted I came across an interesting script function that can be used to shake the screen, similar to the way it's shaken when a critical hit occurs in Baldur's Gate series games:

    game.shake(power, duration)

    Both values are numbers. The bigger the 'power' value, the higher the effect. I found the value of '100' to be the most acceptable one. '1000' is insane shaking. 'Duration' seems to be given in milliseconds, e.g. 1000 = 1 second, 10000 = 10 seconds, etc.
    The following will be close to the effect in Baldur's Gate:

    game.shake(50, 1000)

    It's funny that this command was never used in the original game (at least it's not found in any of the original scripts, maybe it's internally called at some time, but I doubt it). I wonder if someone might find some good uses for it?...

    - Agetian
     
  2. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,655
    Likes Received:
    352
    Is this what shakes the screen when a giant wanders by?

    You need to play with a giant in your party more often, Agetian ;)
     
  3. Agetian

    Agetian Attorney General Administrator

    Joined:
    Aug 14, 2004
    Messages:
    2,526
    Likes Received:
    0
    Not sure if it's the same command... At least I can't tweak the parameters enough to cause that single, momentary shake that occurs when the giant walks... Well, maybe it *is* the same command used internally in the C++ code by the way (I'm not sure).

    - Agetian
     
Our Host!