Raised This Month: $32 Target: $400
 8% 

[TF2] Kart Horns


Post New Thread Reply   
 
Thread Tools Display Modes
Hefal
Senior Member
Join Date: Jul 2015
Old 09-15-2015 , 11:00   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #41

Quote:
Originally Posted by ddhoward View Post
There is no way to make different voice commands do different specific honks. A voice command will always choose a random honk. Only the sm_honk command can play a specific honk.

Which voice commands make honk sounds can be set by adding up the values in the spoiler on the first page. For example, Medic is 1 and Thanks is 2, so to do both, you'd set sm_karthorns_voices to 3. If you want Medic, Thanks, and Incoming, you'd set the cvar to 259. Etc.
You're an angel. Worked, hehe kinda. I think my english is a little bit off tho.

Id like calling for medic should produce a random sound out of two sounds. I have:
Quote:
carhornahkbar1.mp3
carhornahkbar2.mp3
The second one works but every time the first one is chosen by the plugin i get that common error when the file isnt cached ie. "carhornahkbar1.mp3 does not exist or missing" or something similair.
They are both added correctly in downloads.ini and karthorns.txt.
Anything obvious come to mind or should i just keep trying to move things around until it kicks in?

Thank you for you support to the community, +karma ;)
Hefal is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-15-2015 , 12:39   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #42

The file doesn't exist on the client, meaning that you messed up somewhere when uploading it to the server or the FastDL server or whatever. Doublecheck all filenames.
__________________
ddhoward is offline
Randommagic
Senior Member
Join Date: Jun 2014
Location: -
Old 02-05-2016 , 12:32   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #43

Just leaving a comment to confirm that it's working well. Thank you for the awesome plugin.

Still it would be better if the sound emission could be bigger. It's kinda quite to hear if another player beeps in front of me.
__________________

Last edited by Randommagic; 02-05-2016 at 12:38.
Randommagic is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 10-07-2016 , 23:26   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #44

Found a method to play the animations for honking. Will add more info once I can document it further, but using something like this:
Code:
	TE_Start("PlayerAnimEvent");
	TE_WriteNum("m_iPlayerIndex", target);
	TE_WriteNum("m_iEvent", event);
	TE_WriteNum("m_nData", data);
	TE_SendToAll();
with 'event' set to 21 allows you to play any sequence on a player.
Using a 'data' value of 289 or 290 for a Pyro plays the Honking animation; 289 ends immediately after honking, and 290 keeps the player in a kart animation for a short while after honking; both would work for the purposes of this plugin since in condition 82 the default state there is the kart animation.
I noticed that jumping to interrupt the animation causes it to restart once you land and have no other animations, but I'm not sure if that's only on self or also shows up on others.

281/282 for Heavy

(Values around that range also work for getting into and out of karts, which potentially could be nice for other kart plugins).

Other classes need different data values, and these values probably only change if Valve adds sequences before them (thus far, Valve has only added them to the end of the list, so the values have stayed the same for a while).

Not as important, but I seem to recall 'event' 29 doing something similar with other, larger-range values (animation layers?), but seems like 21 is solely for sequences present in the animation list (e.g. in HLMV).
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 10-07-2016 at 23:34.
FlaminSarge is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 10-08-2016 , 00:33   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #45

m_iEvent referrers to PlayerAnimEvent_t

m_nData depends on the m_iEvent
if the event is PLAYERANIMEVENT_CUSTOM_SEQUENCE or PLAYERANIMEVENT_CUSTOM_GESTURE_SEQUENCE then its a sequence index
if its PLAYERANIMEVENT_CUSTOM or PLAYERANIMEVENT_CUSTOM_GESTURE then its an Activity index

all other events dont use m_nData

tf2 calls CTFPlayerAnimState::DoAnimationEvent along with the tempent you could use mp_playanimation/mp_playgesture or CTFPlayer::PlaySpecificSequence/CTFPlayer::PlayGesture or CTFPlayer::DoAnimationEvent

also neither the tempent or the sdkcalls or the commands work 100% of time

Code:
ACT_KART_IDLE 1782
ACT_KART_ACTION_SHOOT 1783
ACT_KART_ACTION_DASH 1784
ACT_KART_JUMP_START 1785
ACT_KART_JUMP_FLOAT 1786
ACT_KART_JUMP_LAND 1787
ACT_KART_IMPACT 1788
ACT_KART_IMPACT_BIG 1789
ACT_KART_GESTURE_POSITIVE 1790
ACT_KART_GESTURE_NEGATIVE 1791
theres no activity for the honk

Code:
models/player/scout.mdl | taunt_vehicle_allclass_honk = 333
models/player/sniper.mdl | taunt_vehicle_allclass_honk = 298
models/player/soldier.mdl | taunt_vehicle_allclass_honk = 382
models/player/demo.mdl | taunt_vehicle_allclass_honk = 294
models/player/medic.mdl | taunt_vehicle_allclass_honk = 233
models/player/heavy.mdl | taunt_vehicle_allclass_honk = 282
models/player/pyro.mdl | taunt_vehicle_allclass_honk = 290
models/player/spy.mdl | taunt_vehicle_allclass_honk = 297
models/player/engineer.mdl | taunt_vehicle_allclass_honk = 372

models/player/scout.mdl | layer_taunt_vehicle_allclass_honk = 332
models/player/sniper.mdl | layer_taunt_vehicle_allclass_honk = 297
models/player/soldier.mdl | layer_taunt_vehicle_allclass_honk = 381
models/player/demo.mdl | layer_taunt_vehicle_allclass_honk = 293
models/player/medic.mdl | layer_taunt_vehicle_allclass_honk = 232
models/player/heavy.mdl | layer_taunt_vehicle_allclass_honk = 281
models/player/pyro.mdl | layer_taunt_vehicle_allclass_honk = 289
models/player/spy.mdl | layer_taunt_vehicle_allclass_honk = 296
models/player/engineer.mdl | layer_taunt_vehicle_allclass_honk = 371

Last edited by arthurdead; 10-08-2016 at 19:44.
arthurdead is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 10-08-2016 , 18:29   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #46

@arthurdead Nice! Thanks for all the info!

I'm pretty sure the SDKCalls all send the PlayerAnimEvent tempent to every client within transmit range, as do the commands.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
The_Z_Dog
Junior Member
Join Date: Jun 2014
Old 12-16-2017 , 18:59   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #47

Can anyone confirm this is still working? Because I cant get the files to download to client from the fast dl server.
The_Z_Dog is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-19-2018 , 01:53   Re: [TF2] Kart Horns (v.15.0726)
Reply With Quote #48

Updated to 18.0118.0. Fixes a lot, improves a little. Wanting to somehow implement a decent "honking" animation, if possible.
__________________
ddhoward is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-24-2018 , 22:02   Re: [TF2] Kart Horns
Reply With Quote #49

Updated to 18.0124.0. This version includes clientprefs support to allow players to customize which voice commands are hooked. This can be configured via the /settings menu.
__________________
ddhoward is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 02-10-2018 , 19:24   Re: [TF2] Kart Horns
Reply With Quote #50

I just added honking animations to Chdata's plugin at https://github.com/Chdata/TF2-Bumper-Cars/pull/5, check it out if you plan on doing the same. I should probably wrap it in a cvar so the two plugins don't have to conflict in that regard.

Got a GitHub/Bitbucket repo for this?
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 02-10-2018 at 19:24.
FlaminSarge is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode