simulating power generator

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: simulating power generator

Post by bongobeat »

ya! thank you, you are right

work now with playsoundat!

triggered by a plate and timer:

Code: Select all

function startwalking()
playSoundAt("cube_move", 1, 4, 29)
end
please can you be more precise with the lever script?
this is like chinese for me
do you have an example?
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: simulating power generator

Post by bongobeat »

I got 2 another issues with the play sound:

when i'm activating sounds in my level 5 dungeon, the sound can be hear in the level 4, exactly when you go over the place where the sound is played in level5, can it be fixed or is it a bug?

editor script

Code: Select all

function startwalking()
playSoundAt("Volcano", 5, 18, 13)
playSoundAt("Steam", 5, 18, 9)
end
then i encountered this one when activating a lot of sounds:

editor script

Code: Select all

function startwalking()
playSoundAt("Volcano", 5, 17, 19)
playSoundAt("Volcano", 5, 16, 14)
playSoundAt("Steam", 5, 14, 17)
playSoundAt("Steam", 5, 9, 13)
playSoundAt("Volcano", 5, 9, 14)
playSoundAt("Steam", 5, 8, 14)
playSoundAt("Volcano", 5, 4, 15)
playSoundAt("Volcano", 5, 11, 18)
playSoundAt("Steam", 5, 19, 26)
end
the editor gaves me this response: OpenAL error in alGenSources: Out of Memory X
whaouu! ok should i delete all files, game, the os, and put my computer in trash?
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: simulating power generator

Post by Komag »

I know Mine of Malan Vael did a work-around to solve the "hear the sound on floor above/below" problem. Maybe you can search for that or download the source at Nexus and look at it.

For the lever, you'll want it to connect to a script that does the stuff you want, and then at the end sets a variable, such as making leverSet = true. Then go back and include in the function at the top to check whether leverSet == true, and if so, stop the function. This way it will not stop the function the first time, because it's still false, but after the first time when it gets set to true at the end, if you try it again it will see that it's true and stop the function.
Finished Dungeons - complete mods to play
Ryeath_Greystalk
Posts: 366
Joined: Tue Jan 15, 2013 3:26 am
Location: Oregon

Re: simulating power generator

Post by Ryeath_Greystalk »

I'm not as fluent at scripting as komag is but I thought I would toss this out.

I use counters to make things like levers and alcove single use. For instance set a counter to value 1, have the lever decrement the counter and have the counter activate the script. Next time the lever is pulled then the counter will keep counting down but never trigger the script again.

If you still want the script to run but want part of it blanked out have the script check the counter value then.

Not as pretty as komags work, but functional. This will allow flags to be kept through save games without wondering if your variable is going to be lost.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: simulating power generator

Post by Komag »

That's actually a really good idea in this case - I've gotten so used to scripting everything that I often forget about some of the more direct approaches which actually work really well in a situation like this. :)
Finished Dungeons - complete mods to play
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: simulating power generator

Post by Drakkan »

bongobeat wrote:I got 2 another issues with the play sound:

when i'm activating sounds in my level 5 dungeon, the sound can be hear in the level 4, exactly when you go over the place where the sound is played in level5, can it be fixed or is it a bug?

editor script

Code: Select all

function startwalking()
playSoundAt("Volcano", 5, 18, 13)
playSoundAt("Steam", 5, 18, 9)
end
check this thread which solve this issue as well as some other regarding sound problems
viewtopic.php?f=14&t=4512&p=58386&hilit ... lem#p58386
Breath from the unpromising waters.
Eye of the Atlantis
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: simulating power generator

Post by bongobeat »

thank you all for your answers

i m gonna try some!
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: simulating power generator

Post by bongobeat »

I think i got an issue resolved

"OpenAL error in alGenSources: Out of Memory X"

it may be caused by sound loop

by default, i have set the loop to true, for 2 custom sounds (taken from mine of malan vael).
now theyre are not looping back, and there is no editor crashing or error message.
Wéééééé :mrgreen:
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
bongobeat
Posts: 1076
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: simulating power generator

Post by bongobeat »

ok i have set a counter to 1 activated by an alcove, which decrease the counter and plays sound and other things! I prefer the solution of Ryeath_Greystalk, more easy for me, cause i m zero in scripting, i m not so good then Komag :D
(dont know if I can say zero in english, it's pure french translate)
what a pity when i see what wonderful things you can get with scripting but i d prefer simple things, scripting is anoying for me :cry:
Anyway thanks very much all for your help! :D

not really look at the solution for the sound, it seems a bit long to put in the editor, i have resolved this issue with puting hidden plates, to activate/deactivate sounds on "strategic area"
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505
Post Reply