Hi!
I'd like to write a simple (?) program, but i don't have much time to learn all the things from uscript(exams, work etc..).
What i'd like to do is to simply play a sound for a self-made package which everyone can hear regardless where they are when i type a certain command in the console or even a better a certain word at the chat.
The sound can not be spammed, so once it's playing the other players can't play the sound again till it's ended AND a certain ammount of time passed(like 5 seconds maybe)
I had a vague idea how it should look, but i can't seem to get it work.
I placed the program into KFPlayersInput.uc as the Legacy Wiki suggested but the same error keeps coming (can't find file piac).
Here's the program code i bashed together:
I'd like to write a simple (?) program, but i don't have much time to learn all the things from uscript(exams, work etc..).
What i'd like to do is to simply play a sound for a self-made package which everyone can hear regardless where they are when i type a certain command in the console or even a better a certain word at the chat.
The sound can not be spammed, so once it's playing the other players can't play the sound again till it's ended AND a certain ammount of time passed(like 5 seconds maybe)
I had a vague idea how it should look, but i can't seem to get it work.
I placed the program into KFPlayersInput.uc as the Legacy Wiki suggested but the same error keeps coming (can't find file piac).
Here's the program code i bashed together:
exec function piac()
{
class piacclass extends piacactor;
#exec OBJ LOAD FILE="..\Sounds\alkysounds.uax"
function piacplay()
{
PlaySound(sound'alkysounds.piac' ,optional ESoundSlot 573, optional bool bNoOverride=TRUE)
ClientMessage("piac");
}
DefaultProperties
{
}