Page 2 of 2
Re: simulating power generator
Posted: Thu May 23, 2013 6:19 pm
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?
Re: simulating power generator
Posted: Thu May 23, 2013 8:10 pm
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?
Re: simulating power generator
Posted: Thu May 23, 2013 10:57 pm
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.
Re: simulating power generator
Posted: Thu May 23, 2013 11:15 pm
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.
Re: simulating power generator
Posted: Fri May 24, 2013 3:51 pm
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.

Re: simulating power generator
Posted: Fri May 24, 2013 4:24 pm
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
Re: simulating power generator
Posted: Fri May 24, 2013 9:04 pm
by bongobeat
thank you all for your answers
i m gonna try some!
Re: simulating power generator
Posted: Fri May 24, 2013 10:27 pm
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éééééé

Re: simulating power generator
Posted: Mon May 27, 2013 7:17 pm
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

(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
Anyway thanks very much all for your help!
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"