Skip to content

Commit

Permalink
c3m2 event trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Derpduck committed Nov 5, 2021
1 parent 8796036 commit f6096ef
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions root/scripts/vscripts/community/maps/c3m2_swamp.nut
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,36 @@ function DoRoundFixes()
// This map is clipped like a tunnel. No known gamebreaking exploits.

make_clip( "_boat_smoother", "Everyone", 1, "-16 -24 0", "16 24 30", "-7863 5391 -8", "-10 -30 0" );
if ( g_BaseMode == "coop" || g_BaseMode == "realism" )
{
devchap( "BASE COOP" );

// FIXES

// FIX: Prevent skipping the plane horde by forcing it even if the door is skipped.

SpawnEntityFromTable( "trigger_once",
{
targetname = g_UpdateName + "_eventskip_plane_trigonce",
StartDisabled = 0,
spawnflags = 1,
filtername = "anv_globalfixes_filter_survivor",
origin = Vector( -1336, 2988, 256 )
} );

EntFire( g_UpdateName + "_eventskip_plane_trigonce", "AddOutput", "mins -24 -1132 -384" );
EntFire( g_UpdateName + "_eventskip_plane_trigonce", "AddOutput", "maxs 24 1132 384" );
EntFire( g_UpdateName + "_eventskip_plane_trigonce", "AddOutput", "solid 2" );

// Fire the door relay when triggered.

EntFire( g_UpdateName + "_eventskip_plane_trigonce", "AddOutput", "OnTrigger Blow_door:Trigger::0:-1" );

// Kill the trigger if the door is opened normally.

EntFire( "Blow_door", "AddOutput", "OnTrigger " + g_UpdateName + "_eventskip_plane_trigonce:Kill::0:-1" );

}
if ( g_BaseMode == "versus" )
{
devchap( "BASE VERSUS" );
Expand All @@ -26,6 +55,8 @@ function DoRoundFixes()
make_clip( "_cabin_door_button_a", "Survivors", 1, "-138 -176 -13", "138 372 444", "-1932 3700 196", "0 28 0" );
make_clip( "_cabin_door_button_b", "Survivors", 1, "-147 -434 -70", "138 404 444", "-1888 3079 226" );
make_clip( "_cabin_door_button_c", "Survivors", 1, "-112 -516 -30", "108 431 521", "-1622 2298 162", "0 28 0" );
make_clip( "_commentary_planeclimb_a", "Survivors", 1, "-29 -3 -44", "29 3 44", "-1931 2612 124" );
make_clip( "_commentary_planeclimb_b", "Survivors", 1, "-36 -14 -44", "36 14 44", "-1908 2578 124", "0 300 0" );
EntFire( "Blow_door", "AddOutput", "OnTrigger " + g_UpdateName + "_cabin_door_button*:Kill::0:-1" );

}
Expand Down

0 comments on commit f6096ef

Please sign in to comment.