Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Shaking the screen to make it seem like its rumbling?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sat Mar 20, 2010 7:12 am    Post subject: Shaking the screen to make it seem like its rumbling? Reply with quote

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
View user's profile Send private message
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Sat Mar 20, 2010 8:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Sun Mar 21, 2010 11:24 am    Post subject: k thanks Reply with quote

k thanks hope this works.
Back to top
View user's profile Send private message
JSH357




Joined: 02 Feb 2003
Posts: 1705

PostPosted: Sun Mar 21, 2010 7:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sun Mar 21, 2010 8:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Mar 25, 2010 2:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Thu Mar 25, 2010 2:18 pm    Post subject: Reply with quote

Yeah, I noticed that. Doesn't really matter.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group