Problem with spawning (fx), Earthquake, dust

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:

Re: Problem with spawning (fx), Earthquake, dust

Post by Neikun »

How clever :o
"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
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problem with spawning (fx), Earthquake, dust

Post by Komag »

for my original game recreation I simply use a custom sound that has a real fade-out
Finished Dungeons - complete mods to play
User avatar
Roman42
Posts: 42
Joined: Tue Dec 11, 2012 11:38 am

Re: Problem with spawning (fx), Earthquake, dust

Post by Roman42 »

Yes, a custom sound is propably the best solution.

I've updated the script a bit in my post, now I only need 4 sounds for the fadeout and the the camerashake is randomized.

Code: Select all

 party:shakeCamera(math.random(0.2)+0.1, 10)
The duration of the shake has been changed from 8 to 10 because of the fadeout.

EDIT: Found a problem and fixed it (edited in my post):

The timer runs too slow if it isn't set in the same level as the player level. So it's better to spawn it to party.level instead of setting it in the editor.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problem with spawning (fx), Earthquake, dust

Post by Komag »

I use a universal timer system (timer on every level, only the timer that matches player level has effect) to alleviate that problem.

I'm not sure I understand what that math.random range will end up being, but the 10 quake is crazy shaky
Finished Dungeons - complete mods to play
User avatar
Roman42
Posts: 42
Joined: Tue Dec 11, 2012 11:38 am

Re: Problem with spawning (fx), Earthquake, dust

Post by Roman42 »

The 10 is the duration of the effect, the random number the intesity of the shakyyness. It ranges from 0.1 to 0.3.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problem with spawning (fx), Earthquake, dust

Post by Komag »

ah, I see, that makes more sense!
Finished Dungeons - complete mods to play
hades200082
Posts: 14
Joined: Sun Feb 24, 2013 5:49 pm

Re: Problem with spawning (fx), Earthquake, dust

Post by hades200082 »

Hi

I've been trying to create a similar effect.

I've defined the sound in mod_assets/scripts/sounds/sounds.lua

Code: Select all

defineSound{
   name = "earthquakestop",
   filename = "assets/samples/env/earthquake_01.wav",
   loop = false,
   volume = 0.4,
   minDistance = 1,
   maxDistance = 6,
}
When I run the dungeon in preview in the editor I get the error "warning! no such sample: earthquakestop"

Is there something I have to do to get it to recognise it?
Last edited by hades200082 on Sun Feb 24, 2013 5:57 pm, edited 1 time in total.
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Problem with spawning (fx), Earthquake, dust

Post by Komag »

you might need to reload or restart
Finished Dungeons - complete mods to play
User avatar
Sutekh
Posts: 127
Joined: Sun Nov 25, 2012 9:58 am
Location: UK

Re: Problem with spawning (fx), Earthquake, dust

Post by Sutekh »

You could also try placing the definition in mod_assets/scripts/sounds.lua instead, rather than using the extra /sounds sub-directory, since the init.lua imports it already. ;)
hades200082
Posts: 14
Joined: Sun Feb 24, 2013 5:49 pm

Re: Problem with spawning (fx), Earthquake, dust

Post by hades200082 »

The reload did the trick ... duh!.

Suggestion to devs ... allow ability to auto reload assets ;)


The path was correct and that is the one loaded by init.lua ;)
Post Reply