Page 1 of 4
Shakin the camera (Solution found)
Posted: Sun Sep 23, 2012 11:08 pm
by Neikun
Code: Select all
function scareshake()
Party:shakeCamera(1,1)
end
on the Party: line it says it's trying to index a nil value. why is that?
EDIT: Should be
Code: Select all
function scareshake()
party:shakeCamera(1,1)
end
Re: Shakin the camera
Posted: Sun Sep 23, 2012 11:13 pm
by Neikun
damn capital P.
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 1:10 am
by Batty
Yes! I found the earthquake sound and the particle effect but figured the shake wasn't available.
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 1:15 am
by Neikun
Earthquake sound? Particle effect?
Maybe you and I can swap codes ^_~
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 1:24 am
by Batty
LOL
Earthquake sound
Earthquake particle effect
Code: Select all
spawn("fx", 1, 15, 15, 3, "dust")
dust:setParticleSystem("earthquake_dust")
Note: spawn(object, level, x, y, facing, [id])
Thanks to Lmaoboat's LED dungeon display code.
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 2:45 am
by Neikun
I'mma go ahead an implement this into my dungeon, because any screen worth shaking deserves the earthquake sound.
Edit: Hmm. The sound's looping. Can't have that.
Code: Select all
defineSound{
name = "earthquakestop",
filename = "assets/samples/env/earthquake_01.wav",
loop = false,
volume = 1,
minDistance = 1,
maxDistance = 6,
}
New sound. But it ends abruptly. Am I going to have to make a new .wav and dim its end?
Oh boo. I don't have access to the earthquake_01.wav
Is there a way to made the audio fade out in scripting?
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 7:04 am
by Batty
That lasts about 8-10 seconds, that's a good length but yeah it ends abruptly.
I have no idea how to make it fade. Maybe try to find your own crumbly sound and use a timer to play it at the end of the rumble?
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 7:22 am
by Ixnatifual
You can also use a decimal value for the shake parameter so it doesn't shake as violently. I ran into the same issue with the sound.

Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 11:22 am
by Neikun
I tried lower versions of the shake, but it wasn't violent enough for me.
Re: Shakin the camera (Solution found)
Posted: Mon Sep 24, 2012 11:48 pm
by Neikun
Any word on fade out of .wav files?