[ShockRifle] - Change default sound

Discussions about UT99
User avatar
OjitroC
Godlike
Posts: 3605
Joined: Sat Sep 12, 2015 8:46 pm

Re: [ShockRifle] - Change default sound

Post by OjitroC »

iSenSe wrote:Assuming the sound is included in the ultimatenewnet*.u file cause NewNet/ZP in general doesnt contain any sound files.
I need to recompile that file with the new sound included.

But to see what that sound/class that i want is called like...
You can check that by opening ultimatenewnet*.u in UEd or UTPT and looking for the weapon under Actors - TournamentWeapons (I assume it's under that), then look through the default properties of the weapon - the sound should also appear in the Sound Browser of UEd. BUT you don't want to recompile the u file with the new sound as that will give rise to mismatches.
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: [ShockRifle] - Change default sound

Post by Feralidragon »

Stuff happened, so I didn't have time to pick this up yet, but from what I see you guys seem to be overcomplicating it quite some.

However, I noticed that FireSound is not replicated, so the way to do it (to work online) is not as straightforward, but it's not much harder either.
So if someone wants to pick this up in the meanwhile, one possible way to do is:

1 - Create a SpawnNotify subclass.

2 - Set its ActorClass to Weapon, not the actual shockrifle class itself.

3 - Add a var to the SpawnNotify subclass to be either a class name (name type), class full qualified name (string type) or a list of them.
This will define the exact class to affect, and this way it doesn't depend on other packages and is flexible to change at any time in an ini file without the need to recompile.
It will also need a secondary var to be replicated to the client, otherwise the client won't know this configuration.

4 - Use it by adding the newly SpawnNotify subclass to the ServerActors in the UnrealTournament.ini file.
Post Reply