
Posts
51
Respect
21Add +1
Forum Rank
Rotting Walker
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
radios()
{
radiolist = getEntArray("radio_location", "targetname");
for(i = 0; i < radiolist.size; i++)
{
radiolist[i] thread play_radio(radiolist[i]);
}
}
play_radio(radio)
{
rememberLastSong = -1;
while(1)
{
wait randomIntRange(150,300);
rand = randomInt(6);
if(rand == rememberLastSong)
rand = randomInt(6);
rememberLastSong = rand;
radioSong = ("radio_song" + rand);
radio playsound(radioSong);
wait 200;
}
}
I am not a pro at this kind of stuff but this is how I made looping sound in Snowblind: Code SnippetPlaintextradios()
{
radiolist = getEntArray("radio_location", "targetname");
for(i = 0; i < radiolist.size; i++)
{
radiolist[i] thread play_radio(radiolist[i]);
}
}
play_radio(radio)
{
rememberLastSong = -1;
while(1)
{
wait randomIntRange(150,300);
rand = randomInt(6);
if(rand == rememberLastSong)
rand = randomInt(6);
rememberLastSong = rand;
radioSong = ("radio_song" + rand);
radio playsound(radioSong);
wait 200;
}
}
radios() //ADD THIS UNDER ZOMBIEMODE::MAIN IN mapname.gsc?
{
radiolist = getEntArray("radio_location", "targetname");
for(i = 0; i < radiolist.size; i++)
{
radiolist[i] thread play_radio(radiolist[i]);
}
}
play_radio(radio) // and then paste this at the end of the .gsc?
{
rememberLastSong = -1;
while(1)
{
wait randomIntRange(150,300);
rand = randomInt(6);
if(rand == rememberLastSong)
rand = randomInt(6);
rememberLastSong = rand;
radioSong = ("radio_song" + rand);
radio playsound(radioSong);
wait 200;
}
}
//and then for the radiant part add a trigger with (targetname, radio_location) and then im done? is //that all?
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
radios()
{
// For entities
radiolist = getEntArray("radio_location", "targetname");
// For structs, uncomment it if you use structs
// radiolist = GetStructArray("radio_location", "targetname");
for(i = 0; i < radiolist.size; i++)
{
radiolist[i] thread play_radio();
}
}
play_radio(radio)
{
while(1)
{
radio playsound("YOUR-SONG-NAME");
// set here the time that you would like to wait.
wait randomIntRange(150,300);
}
// you can also do this instead of using the whileloop
// radio playLoopSound ("YOUR-SONG-NAME");
}
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
thread maps\dw_fx::init();
maps\_zombiemode::main();
level thread radios();
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
thread maps\dw_fx::init();
maps\_zombiemode::main();
level thread radios();
oh sorry I will keep it simple:You can add both of this at the bottom of your MAPNAME.gsc file Code SnippetPlaintextradios()
{
// For entities
radiolist = getEntArray("radio_location", "targetname");
// For structs, uncomment it if you use structs
// radiolist = GetStructArray("radio_location", "targetname");
for(i = 0; i < radiolist.size; i++)
{
radiolist[i] thread play_radio();
}
}
play_radio(radio)
{
while(1)
{
radio playsound("YOUR-SONG-NAME");
// set here the time that you would like to wait.
wait randomIntRange(150,300);
}
// you can also do this instead of using the whileloop
// radio playLoopSound ("YOUR-SONG-NAME");
}
Then scroll up until you see this:under that add: Code SnippetPlaintext/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
thread maps\dw_fx::init();
maps\_zombiemode::main();Yes add entities or structs on the map and use the targetname: radio_location Code SnippetPlaintextlevel thread radios();
So it looks like this: Code SnippetPlaintext/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
thread maps\dw_fx::init();
maps\_zombiemode::main();
level thread radios();
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |