AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] mvm_mission_complete event not firing (https://forums.alliedmods.net/showthread.php?t=324740)

Gurrth 05-25-2020 15:18

[TF2] mvm_mission_complete event not firing
 
Hi all,

I'm trying to use a hookevent from https://wiki.alliedmods.net/Team_For...ssion_complete labelled "mvm_mission_complete"

But when I use the tf_mvm_force_victory command, this event does not show up on the event dump.

Code:

Empty ambient_generic (ambient_generic) at -1454.34, -487.95, 585.00
Item Whitelist file 'item_whitelist.txt' could not be found. All items will be allowed.
Game event "stop_watch_changed", Tick 2973:
Game event "server_cvar", Tick 2973:
- "cvarname" = "mp_tournament_stopwatch"
- "cvarvalue" = "0"
Game event "teamplay_broadcast_audio", Tick 2973:
- "team" = "255"
- "sound" = "Announcer.MVM_Get_To_Upgrade"
- "additional_flags" = "0"
Game event "recalculate_holidays", Tick 2973:
Achievements disabled: cheats turned on in this app session.
Game event "player_stats_updated", Tick 2973:
- "forceupload" = "0"
Game event "post_inventory_application", Tick 2973:
- "userid" = "2"
Game event "player_spawn", Tick 2973:
- "userid" = "2"
- "team" = "2"
- "class" = "9"
Game event "teamplay_round_start", Tick 2973:
- "full_reset" = "1"
Game event "mvm_reset_stats", Tick 2973:
Game event "scorestats_accumulated_update", Tick 2973:
Game event "teamplay_broadcast_audio", Tick 2973:
- "team" = "255"
- "sound" = "Game.YourTeamWon"
- "additional_flags" = "0"
Game event "flagstatus_update", Tick 2973:
- "userid" = "0"
- "entindex" = "360"
Game event "flagstatus_update", Tick 2973:
- "userid" = "0"
- "entindex" = "440"
Game event "localplayer_respawn", Tick 2973:
Game event "teamplay_update_timer", Tick 2973:
Game event "gameui_hidden", Tick 4460:
Game event "gameui_hidden", Tick 4460:
Game event "gameui_activated", Tick 4622:
Game event "gameui_activated", Tick 5582:

My question is, what game event to use for when an mvm game is complete?

CrazyHackGUT 05-25-2020 15:27

Re: [TF2] mvm_mission_complete event not firing
 
You can use usermessage MVMVictory.

Gurrth 05-25-2020 15:42

Re: [TF2] mvm_mission_complete event not firing
 
Quote:

Originally Posted by CrazyHackGUT (Post 2702297)
You can use usermessage MVMVictory.


Like this?

Code:

HookUserMessage(GetUserMessageId(UserMsg"MVMVictory"), mvm_complete, true);

CrazyHackGUT 05-25-2020 16:06

Re: [TF2] mvm_mission_complete event not firing
 
Yes.

Gurrth 05-25-2020 16:10

Re: [TF2] mvm_mission_complete event not firing
 
giving me these errors

https://i.imgur.com/fjynD1X.png

CrazyHackGUT 05-25-2020 16:30

Re: [TF2] mvm_mission_complete event not firing
 
HookUserMessage(GetUserMessageId("MVMVictory" ), mvm_complete, true);

Gurrth 05-25-2020 16:35

Re: [TF2] mvm_mission_complete event not firing
 
https://i.imgur.com/5ohVeie.png

Gurrth 05-25-2020 18:20

Re: [TF2] mvm_mission_complete event not firing
 
i'm guessing tf2's usermessage is different nowadays?

Tilex 05-25-2020 19:05

Re: [TF2] mvm_mission_complete event not firing
 
Maybe you want to check your mvm_complete to match the proper protoype for MsgHook:
https://sm.alliedmods.net/new-api/usermessages/MsgHook
Though, I'm not sure which one of the two ist the right one to use here.

Powerlord 05-26-2020 15:07

Re: [TF2] mvm_mission_complete event not firing
 
Quote:

Originally Posted by Tilex (Post 2702330)
Maybe you want to check your mvm_complete to match the proper protoype for MsgHook:
https://sm.alliedmods.net/new-api/usermessages/MsgHook
Though, I'm not sure which one of the two ist the right one to use here.

The BfRead type as TF2 doesn't use Protobuffer UserMessages.


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

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