View previous topic :: View next topic |
Author |
Message |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sat Mar 20, 2010 7:12 am Post subject: Shaking the screen to make it seem like its rumbling? |
|
|
Currently my problem is I'm trying to get the screen to shake to make it seem the earth is rumbling below my characters feet or around him. But the script the wiki site offered did not work at all I tinkered with it for a while when I was working on one of my pervious scenes in the game but couldn't get it to work. Any simple scripts you guys could show me that give the result I'm looking for or any ideas would be appreciated. |
|
Back to top |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Sat Mar 20, 2010 8:14 am Post subject: |
|
|
Code: | pan camera (up, d, 80)
wait for camera
#####################################
pan camera (down, d * 2, 80)
wait for camera
pan camera (up, d * 2, 80)
wait for camera
##Repeat above as much as you want###
pan camera (down, d, 80)
wait for camera |
Where 'd' is any distance. I would probably use 4 or 5.
80 as a speed might be a little fast, but that can be toned down easily enough if that's the case. |
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Sun Mar 21, 2010 11:24 am Post subject: k thanks |
|
|
k thanks hope this works. |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Sun Mar 21, 2010 7:21 pm Post subject: |
|
|
In my experience, the map needs to be bigger than the smallest size for shaky cam to work, just in case that's the reason it isn't. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sun Mar 21, 2010 8:10 pm Post subject: |
|
|
Here's the quake script used by CURSE OF VAMPIRE, which works even on minimum-width maps:
Code: | quake := random (0, 20)
camera follows hero
if (quake << 3) then (
# shake left
put camera(camera pixel x -- 5, camera pixel y)
)
if (quake >= 17) then (
# shake right
put camera(camera pixel x + 5, camera pixel y)
)
if (quake == 10 || quake == 11) then (play sound(2))
wait (1) |
Slap that in a loop and make sure the sound is a quaky noise and there you go. _________________
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Mar 25, 2010 2:18 am Post subject: |
|
|
JSH is talking about the fact that when the map edge mode is set to Crop, scripts can't move the camera past the map edges, last I checked. Something I still feel bad about. We should maybe add a back-compatibility to restore the old behaviour (always letting scripts pan past the map edge) for old games.
Moogle1 wrote: | Code: | camera follows hero |
|
Nice trick.
(The range of random(0,20) is 0-20, not 0-19, so your script will shake to the right more than the left) _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Mar 25, 2010 2:18 pm Post subject: |
|
|
Yeah, I noticed that. Doesn't really matter. _________________
|
|
Back to top |
|
 |
|