Page 1 of 1

grab flag sound

Posted: Mon Jul 31, 2023 10:30 pm
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?

Re: grab flag sound

Posted: Tue Aug 01, 2023 9:00 am
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!

Re: grab flag sound

Posted: Tue Aug 01, 2023 10:04 am
by Barbie
Another idea: in a mutator periodically (all sec?) check if PlayerReplicationInfo.HasFlag != None and play (or stop) a sound for that player.

Re: grab flag sound

Posted: Tue Aug 01, 2023 1:14 pm
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.

Re: grab flag sound

Posted: Tue Aug 01, 2023 1:26 pm
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);
}

Re: grab flag sound

Posted: Tue Aug 01, 2023 8:52 pm
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?

Re: grab flag sound

Posted: Wed Aug 02, 2023 1:10 am
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.

Re: grab flag sound

Posted: Wed Aug 02, 2023 2:30 am
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.

Re: grab flag sound

Posted: Wed Aug 02, 2023 2:54 am
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.

Re: grab flag sound

Posted: Wed Aug 02, 2023 4:16 am
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.

Re: grab flag sound

Posted: Wed Aug 02, 2023 5:03 am
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)