Thread
: [Solved]
[L4D2] CoOp: Determine non-finale map success/fail
View Single Post
Author
Message
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
02-26-2024 , 16:42 [L4D2] CoOp: Determine non-finale map success/fail
#
1
For finale maps, there is a finale_win (and mission_lost) event that can be checked to determine finale success.
There does not appear to be a map_win event (which I define as at least one survivor successfully made it to the checkpoint, closed the door, and triggered a changelevel to the next map in the campaign).
I thought at first that if OnMapEnd was reached it would be a success (because if mission_lost is triggered, OnMapEnd will not trigger), but that only works most of the time. There are at least two scenarios I can think of that cause problems... OnMapEnd is triggered when a new lobby connects, and OnMapEnd is triggered when a vote passes to change to a new map/campaign. It is also possible that lobby/vote connections go directly to any map in the campaign.
In either round_start or OnMapStart I want to determine if the previous map was a success, or if we got here from a new lobby connect, map vote change, or anything else that might changelevel without a map_win.
I am thinking when the ending checkpoint door is closed I may have to determine if all alive survivors are in the ending checkpoint and set an appropriate global variable to indicate a map_win, then check the value of that variable in round_start and/or OnMapStart.
Any better ideas?
__________________
[
My Plugins
][
TsarVar
][
HealAlt
][
ReverseFF
][
Left4Bots2
][
Nightmare Difficulty
]
Last edited by Mystik Spiral; 02-27-2024 at
07:17
.
Mystik Spiral
View Public Profile
Send a private message to Mystik Spiral
Find More Posts by Mystik Spiral