Page 1 of 2
Sound During Teleport to New Map
Posted: February 15th, 2012, 7:52 pm
by UCLA.RES.
Hey,
Does anyone perchance know how to make a sound entities trigger during a teleport to a new map? Do I have to make it in such a way that ALL loading screens make sounds or something. If so, How would I even do that? I'd really appreciate it if anyone could help me out please.
<(-_-)>
Re: Sound During Teleport to New Map
Posted: February 15th, 2012, 10:55 pm
by Hirato
if you just want to play a sound when the teleport is activated, use /sound (you'll want to register the sound first)
Re: Sound During Teleport to New Map
Posted: February 16th, 2012, 3:46 am
by kddekadenz
1) Would you like to have a custom sound played, when loading it via 'My maps'?
OR
2) Would you like to play a sound when teleporting ingame to another map?
1)
Code: Select all
beep = (registersound "chaze/select" 255)
sound $beep
your sound needs to be stored in a folder in packages/sounds
2)
Code: Select all
beep = (registersound "chaze/select" 255)
level_trigger_1 = [sp yourmap; sound $beep]
teleports to a map named yourmap when trigger 1 is activated and plays a sound
Note: This is code for FPS mode.
Re: Sound During Teleport to New Map
Posted: February 17th, 2012, 2:58 pm
by UCLA.RES.
i actually already have a trigger for this teleport, but I need both triggers to work at the same time. when I did u script kdd, it canced the previous script i had which was:
level_trigger_1 = [
listofmaps = [HT_left HT_right]; map (at $listofmaps (rnd (listlen $listofmaps)))]
is there a way I can get both of them working at the same time?
I thought trigger levels 2's make the rumble noise, so I triedto make it a level trigger 2, but it didnt work. wierd!
Re: Sound During Teleport to New Map
Posted: February 18th, 2012, 8:07 pm
by chocolatepie33
Just to be sure, the "listofmaps" part is just like a random map loader, correct? I think this might do the trick:
Code: Select all
beep = (registersound "chaze/select" 255)
level_trigger_1 = [listofmaps = [HT_left HT_right]; map (at $listofmaps (rnd (listlen $listofmaps))); sound $beep]
Actually, I think that would execute the sound after it loads the map, if you want the sound to load first then the map, I'd try this:
Code: Select all
beep = (registersound "chaze/select" 255)
level_trigger_1 = [sound $beep; listofmaps = [HT_left HT_right]; map (at $listofmaps (rnd (listlen $listofmaps)))]
Re: Sound During Teleport to New Map
Posted: February 20th, 2012, 9:35 am
by kddekadenz
UCLA.RES. wrote:i actually already have a trigger for this teleport, but I need both triggers to work at the same time. when I did u script kdd, it canced the previous script i had which was:
level_trigger_1 = [
listofmaps = [HT_left HT_right]; map (at $listofmaps (rnd (listlen $listofmaps)))]
I quite do not understand your script
Do you want to load a random map with this?
You can make different triggers which teleports you to different maps with my method.
is there a way I can get both of them working at the same time?
I thought trigger levels 2's make the rumble noise, so I triedto make it a level trigger 2, but it didnt work. wierd!
You should take a look at the
Sauerbraten documentation. There is a overview of the trigger states.
Re: Sound During Teleport to New Map
Posted: March 2nd, 2012, 3:02 pm
by UCLA.RES.
to Chochlatepie33, The script you gave (second one since I need the beep at the begging) did some wierd things. First, it didnt load properly, once i put it in the .cfg. I had to manually type the last line (not a complaint at all, just wondering if that has something to do with the script). Then when it took affect, it only teloported me to HT_ left and not HT_right, and it didn't make the beep at all. WIERD I know. lol
to kddekadenz, Ya it is a unique script. It required hirato's genius. It teloports completely randomly, between the two maps, "HT_left" and "HT_right", as listed in the script i posted. So basically, it cant used different triggers for different maps. It has to be that one trigger that makes it random. So i need to alter the existing script so that it maintains its regular function, with the addition of making the beep sound at the begging of the teloport. I really hope this is possible.
THANKS for all the help guys. I really appreciate it!
Re: Sound During Teleport to New Map
Posted: March 4th, 2012, 10:09 pm
by chocolatepie33
hmmm... maybe I messed up the code line somehow...
My only guess is that there wasn't a space between the semicolons. That may cause a problem, since coding usually has to be perfect when following guidelines and syntax.
To break down the code, line 1 registers the sound to be used, part 1 of line 2 plays the sound, part 2 creates the alias/array listofmaps (with values map1 and map2), and part 3 should load the randomly determined map (from that array). I don't know what else may be wrong, other than order, possibly.
Code: Select all
beep = (registersound "chaze/select" 255)
level_trigger_1 = [sound $beep ; listofmaps = [HT_left HT_right] ; map (at $listofmaps (rnd (listlen $listofmaps)))]
Re: Sound During Teleport to New Map
Posted: March 15th, 2012, 3:21 pm
by UCLA.RES.
AHH so close! so now it does randomly teloport but makes the noise like 1/10th of the time, really weird. And every time I restart PAS the object does not have the script attached to it anymore so I have to F6 - load save and execute it again each time. That is really weird. Could it be that the beep is only activated at random intervals as the map? I'm so frustrated. What should I do? Could anyone help me out plz.
Re: Sound During Teleport to New Map
Posted: March 15th, 2012, 3:54 pm
by Mike
Unless I'm missing something, couldn't you just place a sound entity next to each teleporter? You can just gank my code in halloween house and then go in the map and take a look at how I have the entity setup. You can even copy and paste the entities out of the map.

Take care.
-mike