Difference between revisions of "AGIWiki/shake.screen"

From ScummVM :: Wiki
Jump to navigation Jump to search
m
m
Line 5: Line 5:
The '''shake.screen''' command shakes the screen a specified number of times.
The '''shake.screen''' command shakes the screen a specified number of times.


  shake.screen(shakeCount);
  shake.screen(byt shakeCount);


The screen is shaken <code>shakeCount</code> times. The screen is "shaken" by moving the entire screen image around on the monitor to give a violent tremor effect.
The screen is shaken <code>shakeCount</code> times. The screen is "shaken" by moving the entire screen image around on the monitor to give a violent tremor effect.
'''Do not''' use a value of '''0''', as this causes the screen to shake indefinitely, and never returns control back to the interpreter.
== AGIPAL ==


'''Note:''' although shaking the screen 100 or more times is not recommended (because the screen will shake for a long time), it should be noted that the <code>shake.screen</code> command is altered if you are using [[AGIWiki/AGIPAL|AGIPAL]] so that any value between 100 and 109 changes the game's palette instead of shaking the screen.
'''Note:''' although shaking the screen 100 or more times is not recommended (because the screen will shake for a long time), it should be noted that the <code>shake.screen</code> command is altered if you are using [[AGIWiki/AGIPAL|AGIPAL]] so that any value between 100 and 109 changes the game's palette instead of shaking the screen.

Revision as of 09:32, 25 April 2013


AGIWiki


The shake.screen command shakes the screen a specified number of times.

shake.screen(byt shakeCount);

The screen is shaken shakeCount times. The screen is "shaken" by moving the entire screen image around on the monitor to give a violent tremor effect.

Do not use a value of 0, as this causes the screen to shake indefinitely, and never returns control back to the interpreter.

AGIPAL

Note: although shaking the screen 100 or more times is not recommended (because the screen will shake for a long time), it should be noted that the shake.screen command is altered if you are using AGIPAL so that any value between 100 and 109 changes the game's palette instead of shaking the screen.

Parameters

  • shakeCount: a number, 0-255, specifying how many times to shake the screen

Possible errors

  • Some interpreters, such as NAGI, do not support the shake.screen command and will do nothing if the command is issue. It is safe to issue the command on these interpreters, but it will be ignored.
  • Specifying a value of 0 for shakeCount appears to make the screen shake forever.

Examples

The following code will shake the screen five times whenever the player enters this room:

<syntax type = "C++">

 #include "defines.txt"
 if (new_room)
 {
     load.pic(room_no);
     draw.pic(room_no);
     discard.pic(room_no);
     draw(ego);
     show.pic();
     shake.screen(5);
 }

</syntax>

Technical Information

Required interpreter version Available in all AGI versions
Bytecode value 110 (0x6E hex)

See also

Sources