grab flag sound

Discussions about UT99
Post Reply
User avatar
Baardman
Skilled
Posts: 161
Joined: Mon Oct 02, 2017 9:39 am

grab flag sound

Post by Baardman »

HI, is it possible to have a sound when you grab`and carry the enemy flag?, i often find myself getting hit by teammates because i dont realize i grabbed an enemy flag thrown around by fragged teammate.
i already have bigger font but somehow my brain works different i think, im totally hypnotized.
also i turned of frag messages in the menu but they still appear in the game.

i this possible in setting or only in mutator?
User avatar
ExpEM
Adept
Posts: 298
Joined: Wed Nov 09, 2016 1:48 am

Re: grab flag sound

Post by ExpEM »

Setting only, that I know of.
How to do in a Mutator:
-Subclass CTFFlag class
-Copy the SetHolderLighting function to new class
-Make SetHolderLighting play a sound if the holder is a player pawn.
-Subclass Mutator
-Replace CTFFlag with your modified flag in Mutator
-Create new .ini file for Mutator.
All done!
Signature goes here.
User avatar
Barbie
Godlike
Posts: 2824
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: grab flag sound

Post by Barbie »

Another idea: in a mutator periodically (all sec?) check if PlayerReplicationInfo.HasFlag != None and play (or stop) a sound for that player.
"If Origin not in center it be not in center." --Buggie
User avatar
Baardman
Skilled
Posts: 161
Joined: Mon Oct 02, 2017 9:39 am

Re: grab flag sound

Post by Baardman »

ExpEM wrote: Tue Aug 01, 2023 9:00 am Setting only, that I know of.
How to do in a Mutator:
-Subclass CTFFlag class
-Copy the SetHolderLighting function to new class
-Make SetHolderLighting play a sound if the holder is a player pawn.
-Subclass Mutator
-Replace CTFFlag with your modified flag in Mutator
-Create new .ini file for Mutator.
All done!
thanks but i want to be able on servers so they dont have a mutator if i make it,
do you know if there is a hidden setting? or maybe there already is a sound but i dont hear it because i have weird problems anyway, for instance my cache will not move files with xbrowser or cachecleaner3 and in settings even if i change the hud settings to not show frag messages they still show up in the left upper corner.
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: grab flag sound

Post by The_Cowboy »

Actually a nice idea. The methodology could be
1. Spawn an Actor locally, just on the client, from mod menu for instance, with owner set to Root.GetPlayerOwner().PlayerReplicationInfo
2. In the tick function, introduce a heuristic, just like barbie says

Code: Select all

function Tick(float deltatime)
{
if(PlayerReplicationInfo(Owner).HasFlag != None)
 // Playsomesound

super.Tick(deltatime);
}
Last edited by The_Cowboy on Thu Aug 03, 2023 6:42 am, edited 1 time in total.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
ExpEM
Adept
Posts: 298
Joined: Wed Nov 09, 2016 1:48 am

Re: grab flag sound

Post by ExpEM »

The_Cowboy wrote: Tue Aug 01, 2023 1:26 pm Actually a nice idea. The methodology could be
1. Spawn an Actor locally, just on the client, from mod menu for instance, with owner set to Root.GetPlayerOwner().PlayerReplicationInfo
2. In the tick function, introduce a heuristic, just like barbie says

Code: Select all

function Tick(float deltatime)
{
if(Owner.HasFlag != None)
 // Playsomesound

super.Tick(deltatime);
}
Wouldn't Anti-Cheat ping this?
Signature goes here.
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: grab flag sound

Post by The_Cowboy »

If by ping, you mean consider this a cheat then,

a. On the lighter side: I am not challenging HUD or anything of the like, why would a decent anti-cheat get bothered? :)

b. On serious note, yeah if I am not rendering anything on screen that shows more game information than required (radar for instance), not hooking any aiming or unjust advantage logic, or any hack to disrupt normal functioning of server, I am not doing anything illegal.

c. For practicality, I have been using something very similar for Chat Diamond and I don't see ACE kicking me for similar logic.
Last edited by The_Cowboy on Wed Aug 02, 2023 1:09 pm, edited 2 times in total.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
Baardman
Skilled
Posts: 161
Joined: Mon Oct 02, 2017 9:39 am

Re: grab flag sound

Post by Baardman »

Thanks for all the answers, im not a coder though, this is overwhelming me already, if someone could make a mutator and convince the owner of the EatsleepUt server to install it that would be great, because that server is full every night and they always play spammy small maps (very fun though) makes me laugh every time.
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: grab flag sound

Post by The_Cowboy »

Baardman wrote: Wed Aug 02, 2023 2:30 am Thanks for all the answers, im not a coder though, this is overwhelming me already, if someone could make a mutator and convince the owner of the EatsleepUt server to install it that would be great, because that server is full every night and they always play spammy small maps (very fun though) makes me laugh every time.
huh!!! EatsleepUt servers have this functionality already. Not to put any surprises, they use my mutator caulled with the name FlagAnnouncements.
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
User avatar
Baardman
Skilled
Posts: 161
Joined: Mon Oct 02, 2017 9:39 am

Re: grab flag sound

Post by Baardman »

The_Cowboy wrote: Wed Aug 02, 2023 2:54 am
Baardman wrote: Wed Aug 02, 2023 2:30 am Thanks for all the answers, im not a coder though, this is overwhelming me already, if someone could make a mutator and convince the owner of the EatsleepUt server to install it that would be great, because that server is full every night and they always play spammy small maps (very fun though) makes me laugh every time.
huh!!! EatsleepUt servers have this functionality already. Not to put any surprises, they use my mutator caulled with the name FlagAnnouncements.
thats weird, i dont hear any sound from the flag on that server now, offline works fine.
User avatar
The_Cowboy
Skilled
Posts: 165
Joined: Mon Jan 24, 2011 3:22 am
Personal rank: Codezilla

Re: grab flag sound

Post by The_Cowboy »

Sure you must hear a female announcer saying "Red (Blue) flag taken (dropped)" and all players in the server must hear that.

Here is a sample (title is of course for different purpose)
Feralidragon wrote:Trial and error is sometimes better than any tutorial, because we learn how it works for ourselfs, which kills any doubts about anything :tu:
Patreon: https://www.patreon.com/FreeandOpen
Post Reply