Shakin the camera (Solution found)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Shakin the camera (Solution found)

Post 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
Last edited by Neikun on Sun Sep 23, 2012 11:13 pm, edited 1 time in total.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Shakin the camera

Post by Neikun »

damn capital P.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Shakin the camera (Solution found)

Post by Batty »

Yes! I found the earthquake sound and the particle effect but figured the shake wasn't available.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Shakin the camera (Solution found)

Post by Neikun »

Earthquake sound? Particle effect?
Maybe you and I can swap codes ^_~
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Shakin the camera (Solution found)

Post by Batty »

LOL

Earthquake sound

Code: Select all

playSound("earthquake")
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.
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Shakin the camera (Solution found)

Post 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?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Shakin the camera (Solution found)

Post 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?
Ixnatifual

Re: Shakin the camera (Solution found)

Post 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. :x
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Shakin the camera (Solution found)

Post by Neikun »

I tried lower versions of the shake, but it wasn't violent enough for me.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
User avatar
Neikun
Posts: 2457
Joined: Thu Sep 13, 2012 1:06 pm
Location: New Brunswick, Canada
Contact:

Re: Shakin the camera (Solution found)

Post by Neikun »

Any word on fade out of .wav files?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
  • Message me to join in!
Post Reply