Page 2 of 2

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

Posted: Sat Jan 05, 2013 6:35 pm
by Neikun
How clever :o

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

Posted: Sat Jan 05, 2013 7:45 pm
by Komag
for my original game recreation I simply use a custom sound that has a real fade-out

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

Posted: Sun Jan 06, 2013 2:07 am
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.

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

Posted: Sun Jan 06, 2013 5:09 am
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

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

Posted: Sun Jan 06, 2013 12:42 pm
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.

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

Posted: Sun Jan 06, 2013 2:32 pm
by Komag
ah, I see, that makes more sense!

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

Posted: Sun Feb 24, 2013 5:52 pm
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?

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

Posted: Sun Feb 24, 2013 5:55 pm
by Komag
you might need to reload or restart

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

Posted: Sun Feb 24, 2013 6:14 pm
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. ;)

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

Posted: Mon Feb 25, 2013 8:58 pm
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 ;)