Skip to content

Commit

Permalink
rtcw: mp_railway_te
Browse files Browse the repository at this point in the history
  • Loading branch information
plastovicka committed Nov 9, 2024
1 parent d737876 commit 7bf5296
Show file tree
Hide file tree
Showing 3 changed files with 513 additions and 0 deletions.
102 changes: 102 additions & 0 deletions 0.83/Installer/Files/rtcw/nav/mp_railway_te.gm
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
//==========================================================================================
//
// mp_railway_te.gm
//
// Who When What
//------------------------------------------------------------------------------------------
// palota 9 November 2024 Initial Script
//
//==========================================================================================
//

global Map =
{
Debug = 0,

access_door_target_Destroyed = function( trigger )
{
Util.EnableGoal("ROUTE_door");
SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_door.*");
SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_door[24678]");
SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_room.*");
Util.MapDebugPrint( "access_door_target_Destroyed" );
},
};

global OnMapLoad = function()
{
OnTrigger( "The access door has been destroyed!", Map.access_door_target_Destroyed );

Util.DisableGoal("", true);
Util.DisableGoal("ROUTE_door");

SetAvailableMapGoals(TEAM.AXIS, true, "DEFEND_door.*");
SetAvailableMapGoals(TEAM.ALLIES, true, { "ATTACK_.*", "PLANT_.*" });

SetGoalPriority("ATTACK_door1", 0.51);

Util.SetMaxUsersInProgress(1, "DEFEND_.*");

Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );

sleep(20);
SetAvailableMapGoals(TEAM.AXIS, true, "DEFEND_room[1258]");
};

global OnBotJoin = function( bot )
{
bot.TargetBreakableDist = 200;
};

global InitializeRoutes = function()
{
MapRoutes =
{
PLANT_access_door_target =
{
ROUTE_spawn_allies = {
ROUTE_allies1 = { Weight = 2 },
ROUTE_allies2 = {},
}
},
PLANT_control_room_target =
{
ROUTE_spawn_allies = {
ROUTE_allies1 = {
ROUTE_door = {
Weight = 4,
ROUTE_room1 = {},
ROUTE_room2 = { Weight = 2 },
},
ROUTE_back = {
ROUTE_room1 = {},
ROUTE_room2 = {},
},
},
ROUTE_allies2 = {
ROUTE_door = { Weight = 2 },
ROUTE_back = {},
},
}
},
};
MapRoutes["DEFEND_door.*"] =
{
ROUTE_spawn_axis =
{
ROUTE_tram1 = {},
ROUTE_tram2 = {},
}
};
MapRoutes["DEFEND_room.*"] =
{
ROUTE_spawn_axis =
{
ROUTE_room1 = {},
ROUTE_room2 = { Weight = 2 },
}
};
MapRoutes["ATTACK_door.*"] = MapRoutes.PLANT_access_door_target;
MapRoutes["ATTACK_room.*"] = MapRoutes.PLANT_control_room_target;
Util.Routes(MapRoutes);
};
Binary file added 0.83/Installer/Files/rtcw/nav/mp_railway_te.way
Binary file not shown.
Loading

0 comments on commit 7bf5296

Please sign in to comment.