custom/_modern casual preloader/cfg/tr_walkway/games/gsoldier.cfg

197 lines
13 KiB
INI
Raw Permalink Normal View History

2024-07-31 12:14:05 -03:00
// Galaga soldier
// This is a test mini game to demostrate the codin system in tr_walkway. To play this game, enter "exec gsoldier" in the
// console. This will rebind w, s and mouse1. It will go back to normal when the game ends.
// Soldier actions
// ----------------------------------
// Soldier position
alias soldpos1 "bot_teleport Soldier_Boy -240 2229 -434 0 90 0.000000; alias soldiermoveup soldpos2"
alias soldpos2 "bot_teleport Soldier_Boy -140 2229 -434 0 90 0.000000; alias soldiermoveup soldpos3; alias soldiermovedown soldpos1"
alias soldpos3 "bot_teleport Soldier_Boy -40 2229 -434 0 90 0.000000; alias soldiermoveup soldpos4; alias soldiermovedown soldpos2"
alias soldpos4 "bot_teleport Soldier_Boy 60 2229 -434 0 90 0.000000; alias soldiermoveup soldpos5; alias soldiermovedown soldpos3"
alias soldpos5 "bot_teleport Soldier_Boy 160 2229 -434 0 90 0.000000; alias soldiermoveup; alias soldiermovedown soldpos4"
// Soldier movement
alias soldiermoveup soldpos4
alias soldiermovedown soldpos2
// Soldier fire
alias +soldattack "bot_forcefireweapon tf_weapon_rocketlauncher"
alias -soldattack "bot_forcefireweapon ^^"
// Scout handling
// ----------------------------------
// Scout spawning position
alias case4scouts "alias tr_ONCASE05 tr_ONCASE00;alias tr_ONCASE10 tr_ONCASE00;alias tr_ONCASE06 tr_ONCASE01;alias tr_ONCASE11 tr_ONCASE01;alias tr_ONCASE07 tr_ONCASE02;alias tr_ONCASE12 tr_ONCASE02;alias tr_ONCASE08 tr_ONCASE03;alias tr_ONCASE13 tr_ONCASE03;alias tr_ONCASE09 tr_ONCASE04;alias tr_ONCASE14 tr_ONCASE04;alias tr_ONCASE15 tr_CASERAND"
alias scoutdamage
// Scout 1
alias tpscout11 "bot_teleport Invader_Scout_1 -240 3050 -434 0 270 0.000000"
alias tpscout12 "bot_teleport Invader_Scout_1 -140 3050 -434 0 270 0.000000"
alias tpscout13 "bot_teleport Invader_Scout_1 -40 3050 -434 0 270 0.000000"
alias tpscout14 "bot_teleport Invader_Scout_1 60 3050 -434 0 270 0.000000"
alias tpscout15 "bot_teleport Invader_Scout_1 160 3050 -434 0 270 0.000000"
alias tpdamage1 "bot_teleport Invader_Scout_1 1664 566 510 0 270 0.000000"
// Scout 2
alias tpscout21 "bot_teleport Invader_Scout_2 -240 3050 -434 0 270 0.000000"
alias tpscout22 "bot_teleport Invader_Scout_2 -140 3050 -434 0 270 0.000000"
alias tpscout23 "bot_teleport Invader_Scout_2 -40 3050 -434 0 270 0.000000"
alias tpscout24 "bot_teleport Invader_Scout_2 60 3050 -434 0 270 0.000000"
alias tpscout25 "bot_teleport Invader_Scout_2 160 3050 -434 0 270 0.000000"
alias tpdamage2 "bot_teleport Invader_Scout_2 1664 566 510 0 270 0.000000"
// Scout 3
alias tpscout31 "bot_teleport Invader_Scout_3 -240 3050 -434 0 270 0.000000"
alias tpscout32 "bot_teleport Invader_Scout_3 -140 3050 -434 0 270 0.000000"
alias tpscout33 "bot_teleport Invader_Scout_3 -40 3050 -434 0 270 0.000000"
alias tpscout34 "bot_teleport Invader_Scout_3 60 3050 -434 0 270 0.000000"
alias tpscout35 "bot_teleport Invader_Scout_3 160 3050 -434 0 270 0.000000"
alias tpdamage3 "bot_teleport Invader_Scout_3 1664 566 510 0 270 0.000000"
// Scout 4
alias tpscout41 "bot_teleport Invader_Scout_4 -240 3050 -434 0 270 0.000000"
alias tpscout42 "bot_teleport Invader_Scout_4 -140 3050 -434 0 270 0.000000"
alias tpscout43 "bot_teleport Invader_Scout_4 -40 3050 -434 0 270 0.000000"
alias tpscout44 "bot_teleport Invader_Scout_4 60 3050 -434 0 270 0.000000"
alias tpscout45 "bot_teleport Invader_Scout_4 160 3050 -434 0 270 0.000000"
alias tpdamage4 "bot_teleport Invader_Scout_4 1664 566 510 0 270 0.000000"
// Scout 5
alias tpscout51 "bot_teleport Invader_Scout_5 -240 3050 -434 0 270 0.000000"
alias tpscout52 "bot_teleport Invader_Scout_5 -140 3050 -434 0 270 0.000000"
alias tpscout53 "bot_teleport Invader_Scout_5 -40 3050 -434 0 270 0.000000"
alias tpscout54 "bot_teleport Invader_Scout_5 60 3050 -434 0 270 0.000000"
alias tpscout55 "bot_teleport Invader_Scout_5 160 3050 -434 0 270 0.000000"
alias tpdamage5 "bot_teleport Invader_Scout_5 1664 566 510 0 270 0.000000"
// Scout 6
alias tpscout61 "bot_teleport Invader_Scout_6 -240 3050 -434 0 270 0.000000"
alias tpscout62 "bot_teleport Invader_Scout_6 -140 3050 -434 0 270 0.000000"
alias tpscout63 "bot_teleport Invader_Scout_6 -40 3050 -434 0 270 0.000000"
alias tpscout64 "bot_teleport Invader_Scout_6 60 3050 -434 0 270 0.000000"
alias tpscout65 "bot_teleport Invader_Scout_6 160 3050 -434 0 270 0.000000"
alias tpdamage6 "bot_teleport Invader_Scout_6 1664 566 510 0 270 0.000000"
// Scout 7
alias tpscout71 "bot_teleport Invader_Scout_7 -240 3050 -434 0 270 0.000000"
alias tpscout72 "bot_teleport Invader_Scout_7 -140 3050 -434 0 270 0.000000"
alias tpscout73 "bot_teleport Invader_Scout_7 -40 3050 -434 0 270 0.000000"
alias tpscout74 "bot_teleport Invader_Scout_7 60 3050 -434 0 270 0.000000"
alias tpscout75 "bot_teleport Invader_Scout_7 160 3050 -434 0 270 0.000000"
alias tpdamage7 "bot_teleport Invader_Scout_7 1664 566 510 0 270 0.000000"
// Scout 8
alias tpscout81 "bot_teleport Invader_Scout_8 -240 3050 -434 0 270 0.000000"
alias tpscout82 "bot_teleport Invader_Scout_8 -140 3050 -434 0 270 0.000000"
alias tpscout83 "bot_teleport Invader_Scout_8 -40 3050 -434 0 270 0.000000"
alias tpscout84 "bot_teleport Invader_Scout_8 60 3050 -434 0 270 0.000000"
alias tpscout85 "bot_teleport Invader_Scout_8 160 3050 -434 0 270 0.000000"
alias tpdamage8 "bot_teleport Invader_Scout_8 1664 566 510 0 270 0.000000"
// Scout 9
alias tpscout91 "bot_teleport Invader_Scout_9 -240 3050 -434 0 270 0.000000"
alias tpscout92 "bot_teleport Invader_Scout_9 -140 3050 -434 0 270 0.000000"
alias tpscout93 "bot_teleport Invader_Scout_9 -40 3050 -434 0 270 0.000000"
alias tpscout94 "bot_teleport Invader_Scout_9 60 3050 -434 0 270 0.000000"
alias tpscout95 "bot_teleport Invader_Scout_9 160 3050 -434 0 270 0.000000"
alias tpdamage9 "bot_teleport Invader_Scout_9 1664 566 510 0 270 0.000000"
// Scout 10
alias tpscout101 "bot_teleport Invader_Scout_10 -240 3050 -434 0 270 0.000000"
alias tpscout102 "bot_teleport Invader_Scout_10 -140 3050 -434 0 270 0.000000"
alias tpscout103 "bot_teleport Invader_Scout_10 -40 3050 -434 0 270 0.000000"
alias tpscout104 "bot_teleport Invader_Scout_10 60 3050 -434 0 270 0.000000"
alias tpscout105 "bot_teleport Invader_Scout_10 160 3050 -434 0 270 0.000000"
alias tpdamage10 "bot_teleport Invader_Scout_10 1664 566 510 0 270 0.000000"
// Change switch for the scouts starting point
alias deployscout1 "alias tr_ONCASE00 tpscout11; alias tr_ONCASE01 tpscout12;alias tr_ONCASE02 tpscout13;alias tr_ONCASE03 tpscout14;alias tr_ONCASE04 tpscout15"
alias deployscout2 "alias tr_ONCASE00 tpscout21; alias tr_ONCASE01 tpscout22;alias tr_ONCASE02 tpscout23;alias tr_ONCASE03 tpscout24;alias tr_ONCASE04 tpscout25"
alias deployscout3 "alias tr_ONCASE00 tpscout31; alias tr_ONCASE01 tpscout32;alias tr_ONCASE02 tpscout33;alias tr_ONCASE03 tpscout34;alias tr_ONCASE04 tpscout35"
alias deployscout4 "alias tr_ONCASE00 tpscout41; alias tr_ONCASE01 tpscout42;alias tr_ONCASE02 tpscout43;alias tr_ONCASE03 tpscout44;alias tr_ONCASE04 tpscout45"
alias deployscout5 "alias tr_ONCASE00 tpscout51; alias tr_ONCASE01 tpscout52;alias tr_ONCASE02 tpscout53;alias tr_ONCASE03 tpscout54;alias tr_ONCASE04 tpscout55"
alias deployscout6 "alias tr_ONCASE00 tpscout61; alias tr_ONCASE01 tpscout62;alias tr_ONCASE02 tpscout63;alias tr_ONCASE03 tpscout64;alias tr_ONCASE04 tpscout65"
alias deployscout7 "alias tr_ONCASE00 tpscout71; alias tr_ONCASE01 tpscout72;alias tr_ONCASE02 tpscout73;alias tr_ONCASE03 tpscout74;alias tr_ONCASE04 tpscout75"
alias deployscout8 "alias tr_ONCASE00 tpscout81; alias tr_ONCASE01 tpscout82;alias tr_ONCASE02 tpscout83;alias tr_ONCASE03 tpscout84;alias tr_ONCASE04 tpscout85"
alias deployscout9 "alias tr_ONCASE00 tpscout91; alias tr_ONCASE01 tpscout92;alias tr_ONCASE02 tpscout93;alias tr_ONCASE03 tpscout94;alias tr_ONCASE04 tpscout95"
alias deployscout10 "alias tr_ONCASE00 tpscout101; alias tr_ONCASE01 tpscout102;alias tr_ONCASE02 tpscout103;alias tr_ONCASE03 tpscout104;alias tr_ONCASE04 tpscout105"
// Deploy chain
alias choosescout "choosescout1"
alias choosescout1 "deployscout1; alias scoutdamage tpdamage1; alias choosescout choosescout2"
alias choosescout2 "deployscout2; alias scoutdamage tpdamage2; alias choosescout choosescout3"
alias choosescout3 "deployscout3; alias scoutdamage tpdamage3; alias choosescout choosescout4"
alias choosescout4 "deployscout4; alias scoutdamage tpdamage4; alias choosescout choosescout5"
alias choosescout5 "deployscout5; alias scoutdamage tpdamage5; alias choosescout choosescout6"
alias choosescout6 "deployscout6; alias scoutdamage tpdamage6; alias choosescout choosescout7"
alias choosescout7 "deployscout7; alias scoutdamage tpdamage7; alias choosescout choosescout8"
alias choosescout8 "deployscout8; alias scoutdamage tpdamage8; alias choosescout choosescout9"
alias choosescout9 "deployscout9; alias scoutdamage tpdamage9; alias choosescout choosescout10"
alias choosescout10 "deployscout10; alias scoutdamage tpdamage10; alias choosescout choosescout1"
// Keys setup
// ----------------------------------
bind "w" "soldiermoveup"
bind "s" "soldiermovedown"
bind "MOUSE1" "+soldattack"
// Initial configuration
// ----------------------------------
ent_fire custom_timer_a refiretime 0.01
ent_fire custom_timer_b refiretime 5
ent_fire custom_timer_c refiretime 5
// Variable A will be the ammount of bots left to be released per wave. The initial wave
// will have 10 scouts
// Variable B will be the total ammount of HP of the player. When it reach zero, the
// player will die and the game will end
ent_fire custom_Avar setvalue 10
ent_fire custom_Avarcomp setcomparevalue 0
ent_fire custom_Bvar setvalue 200
ent_fire custom_Bvarcomp setcomparevalue 0
tr_kick
tr_deploy_no
tr_POSEVENT_ON
setpos -491.211639 2526.273438 -91.027405;setang 42.176033 3.626426 0.000000
alias tr_ONAEQUAL newlevel
// Hurt the player when a bot reaches the middle point of th walkway, reduce the B
// variable by 20 and if B reaches 0, kill the player and end the game
alias tr_ONMID "hurtme 20;ent_fire custom_Bvar subtract 20"
alias tr_ONBEQUAL "kill;play misc/your_team_lost.mp3; tr_TEXT2;tr_TIMERC_ON;alias tr_ONTIMERC endgsoldier"
ent_fire custom_text1 addoutput "message Prepare for a new wave"
ent_fire custom_text2 addoutput "message You fail!"
ent_fire custom_text3 addoutput "message You won!"
// Start game
// ----------------------------------
alias tr_ONTRIGGER "tr_TIMERA_ON; alias tr_ONTIMERA configstep1"
tr_RELAY
alias configstep1 "tr_default; alias tr_ONTIMERA configstep2"
alias configstep2 "tr_deploy_no; alias tr_ONTIMERA configstep3"
alias configstep3 "bot -team red -class soldier -name Soldier_Boy; bot -team blue -class scout -name Invader_Scout_1; bot -team blue -class scout -name Invader_Scout_2; bot -team blue -class scout -name Invader_Scout_3; bot -team blue -class scout -name Invader_Scout_4; bot -team blue -class scout -name Invader_Scout_5; alias tr_ONTIMERA configstep4"
alias configstep4 "tr_killmid_ON; bot -team blue -class scout -name Invader_Scout_6; bot -team blue -class scout -name Invader_Scout_7; bot -team blue -class scout -name Invader_Scout_8; bot -team blue -class scout -name Invader_Scout_9; bot -team blue -class scout -name Invader_Scout_10; alias tr_ONTIMERA configstep5"
alias configstep5 "tr_hurt_on; tr_crits_OFF; alias tr_ONTIMERA configstep6"
alias configstep6 "tr_resupply_OFF; alias tr_ONTIMERA configstep7"
alias configstep7 "alias tr_ONTIMERB scoutstep1; alias tr_ONTIMERA configstep8"
alias configstep8 "tr_TIMERB_ON; alias tr_ONTIMERA configstep9"
alias configstep9 "soldpos3;play ui/gamestartup4.mp3; alias tr_ONTIMERA; tr_TIMERA_OFF"
// Scout spawns
// ----------------------------------
alias scoutstep1 "tr_TIMERA_ON; alias tr_ONTIMERA scoutstep2"
alias scoutstep2 "case4scouts; alias tr_ONTIMERA scoutstep3"
alias scoutstep3 "choosescout; alias tr_ONTIMERA scoutstep4"
alias scoutstep4 "scoutdamage; alias tr_ONTIMERA scoutstep5"
alias scoutstep5 "tr_CASERAND; alias tr_ONTIMERA scoutstep6"
alias scoutstep6 "tr_ADEC; alias tr_ONTIMERA; tr_TIMERA_OFF"
// New level
// ----------------------------------
alias newlevel "tr_TIMERC_ON; tr_TIMERB_OFF; alias tr_ONTIMERC endlvlstep1"
alias endlvlstep1 "nextlevel; alias tr_ONTIMERC endlvlstep2"
alias endlvlstep2 "bot_refill; tr_TIMERB_ON; tr_TIMERC_OFF; alias tr_ONTIMERC"
alias nextlevel "gotolevel2"
alias gotolevel2 "tr_TEXT1; play ui/gamestartup2.mp3; ent_fire custom_timer_b refiretime 4; ent_fire custom_Avar setvalue 20; alias nextlevel gotolevel3"
alias gotolevel3 "tr_TEXT1; play ui/gamestartup5.mp3; ent_fire custom_timer_b refiretime 3; ent_fire custom_Avar setvalue 30; tr_speed_scout; alias nextlevel gotolevel4"
alias gotolevel4 "tr_TEXT1; play ui/gamestartup6.mp3; ent_fire custom_timer_b refiretime 0.5; ent_fire custom_Avar setvalue 10;alias nextlevel gotolevel5"
alias gotolevel5 "tr_TEXT3; play misc/your_team_won.mp3; alias tr_ONTIMERB endgsoldier"
// Shut down
// ----------------------------------
alias endgsoldier "kick Soldier_Boy;kick Invader_Scout_1;kick Invader_Scout_2;kick Invader_Scout_3;kick Invader_Scout_4;kick Invader_Scout_5;kick Invader_Scout_6;kick Invader_Scout_7;kick Invader_Scout_8;kick Invader_Scout_9;kick Invader_Scout_10;bind a +moveleft; bind d +moveright; bind s +back; bind w +forward; bind MOUSE1 +attack;tr_TIMERA_OFF;tr_TIMERB_OFF;tr_TIMERC_OFF; tr_default; tr_POSEVENT_OFF"