Difference between revisions of "AGIWiki/shake.screen"

Jump to navigation Jump to search
462 bytes added ,  15:05, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
(Created page with "{{AGIWiki}} The '''shake.screen''' command shakes the screen a specified number of times. shake.screen(shakeCount); The screen is shaken <code>shakeCount</code> times. The sc...")
 
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
{{AGIWiki}}
{{AGIWiki}}


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);
== Syntax ==
 
  shake.screen(byt shakeCount);
 
== Remarks ==


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.
Line 22: Line 32:
The following code will shake the screen five times whenever the player enters this room:
The following code will shake the screen five times whenever the player enters this room:


<syntax type = "C++">
<syntaxhighlight lang="cpp">
   #include "defines.txt"
   #include "defines.txt"


Line 36: Line 46:
       shake.screen(5);
       shake.screen(5);
   }
   }
</syntax>
</syntaxhighlight>
 
== Technical Information ==
 
{| border="1" cellpadding="2"
| style="background-color: #efefef" | '''Required interpreter version'''
| Available in all AGI versions
|-
| style="background-color: #efefef" | '''Bytecode value'''
| 110 (0x6E hex)
|}


== See also ==
== See also ==
Line 49: Line 69:


[[Category:AGIWiki/Logic Commands]]
[[Category:AGIWiki/Logic Commands]]
[[Category:AGIWiki/Display commands]]
[[Category:AGIWiki/Display Commands]]
TrustedUser
2,147

edits

Navigation menu