-
Notifications
You must be signed in to change notification settings - Fork 1
/
ME5_ObjectiveCTF.lua
797 lines (675 loc) · 27.4 KB
/
ME5_ObjectiveCTF.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
local __SCRIPT_NAME = "ME5_ObjectiveCTF";
local debug = true
local function PrintLog(...)
if debug == true then
print("["..__SCRIPT_NAME.."]", unpack(arg));
end
end
PrintLog("Entered")
ScriptCB_DoFile("ME5_Objective")
ScriptCB_DoFile("ME5_SoundEvent_ctf")
if bStockFontLoaded == nil then
-- Has the stock font been loaded?
bStockFontLoaded = false
end
MEU_GameMode = "meu_ctf"
--=============================
-- CaptureFlag
-- Prototype for a captureable flag in the game world
--=============================
CaptureFlag =
{
-- required external fields:
name = nil, -- Name of the flag object in the level
captureRegion = nil, -- Name of the region where the flag needs to be carried to be captured. Should never be set to nil
-- optional external fields:
homeRegion = nil, -- Name of the region where the flag will respawn back to. If nil, then it never respawns.
capRegionMarker = "hud_objective_icon_circle", -- Name of the icon used to mark the capture point on the mini-map
capRegionMarkerScale = 3.0, -- How big the capRegionMarker should be on the minimap
capRegionDummyObjectATT = nil, --need dummy objects so we can add an in-HUD marker (regions can't be marked in the HUD currently...it's a long story)
capRegionDummyObjectDEF = nil,
mapIcon = "hud_target_flag_onscreen", -- Texture name of the icon that appears on the map
mapIconScale = 3.0, -- How big to draw the map icon
}
function CaptureFlag:New(o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end
--=============================
-- ObjectiveCTF
-- Handles the logic for a capture the flag game
--=============================
ObjectiveCTF = Objective:New
{
-- external values
captureLimit = 5,
neutralFlagMessage = "game.flag.neutral.",
enemyFlagMessage = "game.flag.enemy.",
friendFlagMessage = "game.flag.friend.",
capRegionMarker = "hud_objective_icon_circle",
capRegionMarkerScale = 3.0,
capRegionDummyObjectATT = nil, --need dummy objects so we can add an in-HUD marker (regions can't be marked in the HUD currently...it's a long story)
capRegionDummyObjectDEF = nil,
}
--
-- Add a flag to the game
-- Caller should send AddFlag() a table that corresponds to the CaptureFlag prototype (seen above)
--
function ObjectiveCTF:AddFlag(flagParams)
-- make sure we have a table to add the flag to
self.flags = self.flags or {}
--error check the params
assert(flagParams.name, "ERROR: no name specified for the flag!")
assert(flagParams.captureRegion, "ERROR: flag missing capture region name")
assert(GetRegion(flagParams.captureRegion), "ERROR: capture region for a flag does not exist in map")
if flagParams.homeRegion == "" then
flagParams.homeRegion = nil --because designers sometimes use "" to specify no home region
end
if flagParams.homeRegion and not GetRegion(flagParams.homeRegion) then
--NOTE: it *is* valid to have a nil homeRegion
assert(false, "WARNING: Home region for a flag does not exist in map!") end
flagParams.name = string.lower(flagParams.name)
assert(flagParams.regionDummyObject, "WARNING: no dummy object specified for the flag! (this is used to mark the flag's capture region on the HUD)")
-- add a new flag to the list of flags
self.flags[flagParams.name] = CaptureFlag:New(flagParams)
end
-- DESIGNERS: Override these functions if necessary
function ObjectiveCTF:OnCapture(flag)
end
function ObjectiveCTF:OnReturn(flag)
end
function ObjectiveCTF:OnPickup(flag)
end
function ObjectiveCTF:OnDrop(flag)
end
function ObjectiveCTF:OnReset(flag)
end
-- Get game time limit as set in game options menu, if any. 0 if none.
function ObjectiveCTF:GetGameTimeLimit()
return ScriptCB_GetCTFMaxTimeLimit()
end
function ObjectiveCTF:GameOptionsTimeLimitUp()
local teamATTpts = GetTeamPoints(teamATT)
local teamDEFpts = GetTeamPoints(teamDEF)
if ( teamATTpts > teamDEFpts ) then
self:Complete(teamATT)
elseif ( teamATTpts < teamDEFpts ) then
self:Complete(teamDEF)
else
ScriptCB_SndBusFade("music", 0.0, 1.0)
--tied, so victory for both
MissionVictory({1,2})
end
end
--
-- Initialize the capture objective
--
function ObjectiveCTF:Start()
--carriedFlagsNum = 0
--=============================
-- local functions
--=============================
--
-- gets the opposite team from what you passed in
--
local GetOpposingTeam = function(team)
if team == self.teamATT then
return self.teamDEF
else
return self.teamATT
end
end
--
-- message generator
--
local FlagMessage = function(flag, message)
if not self.multiplayerRules then return end --ignore flag messages in single player
local flagTeam = GetObjectTeam(flag.name)
if flagTeam == 0 then
if self.neutralFlagMessage then
--broadcast a neutral message to everyone
ShowMessageText(self.neutralFlagMessage .. message)
end
else
--setup "friendTeam" to be the flag's team, and "enemyTeam" to be the other team
local friendTeam = flagTeam
local enemyTeam = GetOpposingTeam(friendTeam)
--send appropriate localized messages to each team
if self.friendFlagMessage then
ShowMessageText(self.friendFlagMessage .. message, friendTeam)
end
if self.enemyFlagMessage then
ShowMessageText(self.enemyFlagMessage .. message, enemyTeam)
end
local missionTime = ScriptCB_GetMissionTime()
local timeSinceLastPlayed = missionTime - self.lastVOPlayTime
--if self.multiplayerRules and (timeSinceLastPlayed > 3.0) then
-- I think brad is working under a different model than I am
-- For me, the attacking team is the one taking the flag (and of opposite team of the flag)
SoundEvent_BroadcastVO( message, enemyTeam, friendTeam )
self.lastVOPlayTime = missionTime
--end
end
end
local UpdateMarkerPulses = function(flag)
if not flag.mapIcon then
return end
local flagTeam = GetObjectTeam(flag.name)
local carrierTeam = 0
if flagTeam ~= 0 then
carrierTeam = GetOpposingTeam(flagTeam)
end
PrintLog("updating markers for flag:", flag.name)
if flag.carrier then
PrintLog("flag carrier")
--no marker on the flag, yes marker on the capture region
MapRemoveEntityMarker(flag.name)
MapAddRegionMarker(GetRegion(flag.captureRegion), flag.capRegionMarker, 4.0,
carrierTeam, "YELLOW", false, false, true)
MapAddEntityMarker(flag.regionDummyObject, self.capRegionMarker, self.capRegionMarkerScale, carrierTeam, "YELLOW", true, false, true)
else
PrintLog("no carrier")
--yes marker on the flag, no marker on the capture region
MapAddEntityMarker(flag.name, flag.mapIcon, 4.0, carrierTeam, "YELLOW", true, false, true, true)
MapRemoveRegionMarker(GetRegion(flag.captureRegion))
MapRemoveEntityMarker(flag.regionDummyObject)
end
end
local CaptureFlag = function(flag, carrierTeam)
self:OnCapture(flag)
local flagPtr = GetObjectPtr(flag.name)
AddFlagCapturePoints(GetFlagCarrier(flag.name))
flag.carrier = nil
UpdateMarkerPulses(flag)
FlagMessage(flag, "captured")
AddTeamPoints(carrierTeam, 1)
KillObject(flagPtr)
--carriedFlagsNum = carriedFlagsNum - 1
--ShowMessageText("game.flag.flagnum_"..carriedFlagsNum)
end
local ReturnFlag = function(flag, carrierTeam)
self:OnReturn(flag)
local flagPtr = GetObjectPtr(flag.name)
flag.carrier = nil
UpdateMarkerPulses(flag)
FlagMessage(flag, "returned")
KillObject(flagPtr)
print( "------------ SHOULD HAVE PLAYED RETURN VO" )
--carriedFlagsNum = carriedFlagsNum - 1
--ShowMessageText("game.flag.flagnum_"..carriedFlagsNum)
end
--==========
-- Set the number of guys in the level to number in game options
--==========
ScriptCB_SetNumBots(ScriptCB_GetCTFNumBots())
--===============================
-- Initialization logic
--===============================
--showTeamPoints defaults to true in multiplayer mode if the designer doesn't specify it
if self.showTeamPoints == nil and self.multiplayerRules then
self.showTeamPoints = true
else
self.showTeamPoints = false
end
--initialize the base objective data
Objective.Start(self)
-- initialize internal values
self.flags = self.flags or {}
self.lastVOPlayTime = -10000.0
-- error checking
numFlags = 0
for i, f in pairs(self.flags) do
numFlags = numFlags + 1
end
if(numFlags == 0) then
assert(false, "ERROR: no flags were added to the objective")
return
end
if self.multiplayerRules then
self.captureLimit = ScriptCB_GetCTFCaptureLimit()
SetReinforcementCount(self.teamATT, -1)
SetReinforcementCount(self.teamDEF, -1)
SetFlagGameplayType("2flag")
else
SetFlagGameplayType("campaign")
end
--make sure the flags are colored properly when they're dropped
SetClassProperty("com_item_flag", "DroppedColorize", 1)
-- activate map markers, set region properties on the c++ objects, activate the regions, etc..
self.AIGoals = {}
for i, flag in pairs(self.flags) do
local flagPtr = GetObjectPtr(flag.name)
assert(flagPtr, "ERROR: flag "..flag.name.." does not exist in the map")
local flagTeam = GetObjectTeam(flag.name)
--Add AI Goals
if self.AIGoalWeight > 0.0 then
table.insert(self.AIGoals, AddAIGoal(GetOpposingTeam( flagTeam ), "CTFOffense", 70*self.AIGoalWeight, flag.captureRegion, flagPtr))
if flag.homeRegion then
table.insert(self.AIGoals, AddAIGoal(flagTeam, "CTFDefense", 30*self.AIGoalWeight, flagPtr))
else
--if a flag has no home region, we can't put it in traditional CTFDefense mode, but we can put
--it in generic "Defend this object" mode, so they'll put up a parameter around the flag
--and shoot anyone who gets near
table.insert(self.AIGoals, AddAIGoal(flagTeam, "Defend", 30*self.AIGoalWeight, flag.name))
end
end
ActivateRegion(flag.captureRegion)
--always display two solid markers: one for the flag and one for the capture region
local displayTeam = 0
if flagTeam ~= 0 then
displayTeam = GetOpposingTeam(flagTeam)
end
--initialize the "pulse" effect
UpdateMarkerPulses(flag)
if(flag.homeRegion) then
SetProperty(i, "HomeRegion", flag.homeRegion)
ActivateRegion(flag.homeRegion)
end
--SetProperty(flagPtr, "AllowTeamPickup", 0) --disallow teammates from picking up their own flags
--just in case the player is standing right where the flag spawns when the objective starts...
flag.carrier = GetFlagCarrier(flag.name)
if flag.carrier then
UpdateMarkerPulses(flag)
FlagMessage(flag, "taken")
self:OnPickup(flag)
end
end
--=======================================
-- Event responses
--=======================================
-- flag reset to starting position
OnFlagReset(
function (flagPtr)
if self.isComplete then return end
local flagName = GetEntityName(flagPtr)
local flag = self.flags[flagName]
if not flag then return end --this particular flag is not part of this goal
-- set as not moved
flag.carrier = nil
-- force enter-region event for anyone in the home region
if flag.homeRegion then
DeactivateRegion(flag.homeRegion)
ActivateRegion(flag.homeRegion)
end
UpdateMarkerPulses(flag)
self:OnReset(flag)
end
)
OnFlagPickUp(
function(flagPtr, carrierObj)
if self.isComplete then return end
local flagName = GetEntityName(flagPtr)
local flag = self.flags[flagName]
if not flag then return end --this particular flag is not part of this goal
local carrierTeam = GetCharacterTeam(carrierObj)
flag.carrier = carrierObj
--local charPtr = GetCharacterUnit(flag.carrier)
--carriedFlagsNum = carriedFlagsNum + 1
--ShowMessageText("game.flag.flagnum_"..carriedFlagsNum)
if GetObjectTeam(flag.name) == carrierTeam then
--if the flag is in its home region, return it to the stand
--if flag.homeRegion and IsCharacterInRegion(carrierObj, flag.homeRegion) then
ReturnFlag(flag, carrierTeam)
--end
else
--[[if carrierTeam == 1 then
destroycarriergoal2 = AddAIGoal(GetOpposingTeam(carrierTeam), "Destroy", 60, charPtr)
elseif carrierTeam == 2 then
destroycarriergoal1 = AddAIGoal(GetOpposingTeam(carrierTeam), "Destroy", 60, charPtr)
end]]
--if the flag is in its capture region, cap the flag
if IsCharacterInRegion(carrierObj, flag.captureRegion) and CanCharacterInteractWithFlag(carrierObj) then
--PrintLog("carrierObj:", carrierObj)
--PrintLog("inside OnFlagPickUp()")
--if carriedFlagsNum < 2 then
CaptureFlag(flag, carrierTeam)
--[[else
ShowMessageText("game.flag.blocked", carrierTeam)
local i = 0
i = i + 1
local flagBlockCheckTimer = CreateTimer("flagBlockCheckTimer_"..i)
SetTimerValue(flagBlockCheckTimer, 1)
StartTimer(flagBlockCheckTimer)
ShowTimer(flagBlockCheckTimer)
OnTimerElapse(
function(timer)
if IsCharacterInRegion(carrier, flag.captureRegion) and CanCharacterInteractWithFlag(carrier) then
if not carriedFlagsNum < 2 then
SetTimerValue(flagBlockCheckTimer, 1)
StartTimer(flagBlockCheckTimer)
else
CaptureFlag(flag, carrierTeam)
DestroyTimer(flagBlockCheckTimer)
end
else
end
end,
flagBlockCheckTimer
)
end]]
end
end
UpdateMarkerPulses(flag)
FlagMessage(flag, "taken")
--play a little ditty in campaign mode
if not self.multiplayerRules then
BroadcastVoiceOver("common_objComplete")
end
ScriptCB_SndPlaySound("common_flagAction_pickup")
self:OnPickup(flag)
end
)
OnFlagDrop(
function(flagPtr, carrierObj)
if self.isComplete then return end
local flagName = GetEntityName(flagPtr)
local flag = self.flags[flagName]
if not flag then return end --this particular flag is not part of this goal
local carrierTeam = GetCharacterTeam(carrierObj)
flag.carrier = nil
--carriedFlagsNum = carriedFlagsNum - 1
--ShowMessageText("game.flag.flagnum_"..carriedFlagsNum)
--[[if carrierTeam == 1 then
DeleteAIGoal(destroycarriergoal2)
elseif carrierTeam == 2 then
DeleteAIGoal(destroycarriergoal1)
end]]
ScriptCB_SndPlaySound("common_flagAction_drop")
UpdateMarkerPulses(flag)
FlagMessage(flag, "dropped")
self:OnDrop(flag)
end
)
for i, flag in pairs(self.flags) do
if(flag.homeRegion) then
OnEnterRegion(
--when a carrier enters the flag's home region...
function(region, carrier)
if self.isComplete then return end
--check to see if he's carrying this flag, and if the flag's home region
--corresponds to this region
for i, f in pairs(self.flags) do
if f.carrier == carrier and string.lower(f.homeRegion) == string.lower(GetRegionName(region)) then
local flagPtr = GetObjectPtr(f.name)
local flagTeam = GetObjectTeam(f.name)
local carrierTeam = GetCharacterTeam(carrier)
if flagTeam == carrierTeam then
ReturnFlag(f, carrierTeam)
end
end
end
end,
flag.homeRegion
)
end
OnEnterRegion(
--when a carrier enters the flag's capture region...
function(region, carrier)
if self.isComplete then return end
if not CanCharacterInteractWithFlag(carrier) then return end
--check to see if he's carrying this flag and is on an enemy team, and
--the flag's capture region corresponds to this region
for i, f in pairs(self.flags) do
if f.carrier == carrier and string.lower(f.captureRegion) == string.lower(GetRegionName(region)) then
local flagPtr = GetObjectPtr(f.name)
local flagTeam = GetObjectTeam(f.name)
local carrierTeam = GetCharacterTeam(carrier)
if flagTeam ~= carrierTeam then
--PrintLog("in OnEnterRegion()")
--if carriedFlagsNum < 2 then
CaptureFlag(f, carrierTeam)
--[[else
ShowMessageText("game.flag.blocked", carrierTeam)
local i = 0
i = i + 1
local flagBlockCheckTimer = CreateTimer("flagBlockCheckTimer_"..i)
SetTimerValue(flagBlockCheckTimer, 1)
StartTimer(flagBlockCheckTimer)
ShowTimer(flagBlockCheckTimer)
OnTimerElapse(
function(timer)
if IsCharacterInRegion(carrier, flag.captureRegion) and CanCharacterInteractWithFlag(carrier) then
if not carriedFlagsNum < 2 then
SetTimerValue(flagBlockCheckTimer, 1)
StartTimer(flagBlockCheckTimer)
else
CaptureFlag(flag, carrierTeam)
DestroyTimer(flagBlockCheckTimer)
end
else
end
end,
flagBlockCheckTimer
)
end]]
end
end
end
end,
flag.captureRegion
)
end
-- team points change
OnTeamPointsChange(
function (team, points)
if self.isComplete then return end
if points >= self.captureLimit then
for i, flag in pairs(self.flags) do
MapRemoveRegionMarker(flag.captureRegion)
MapRemoveEntityMarker(flag.name)
end
--SetFlagGameplayType("none") -- moved to objective:start
self:Complete(team)
end
end
)
-- spawn block for Husks --
OnTicketCountChange(
function (team, count)
if team == CIS and count == 20 then
AllowAISpawn(3, false)
end
end
)
end
-- TODO: need to add lines for SSVxRPR and SSVxCER
if not ScriptCB_InMultiplayer() then
if ME5_SideVar == 1 then
CTF_SoundEvents_Var = 1
elseif ME5_SideVar == 2 then
CTF_SoundEvents_Var = 2
elseif ME5_SideVar == 3 then
CTF_SoundEvents_Var = 3
elseif ME5_SideVar == 4 then
CTF_SoundEvents_Var = 4
end
else
if gCurrentMapManager.onlineSideVar == "SSVxGTH" or gCurrentMapManager.onlineSideVar == 1 then
CTF_SoundEvents_Var = 1
elseif gCurrentMapManager.onlineSideVar == "SSVxCOL" or gCurrentMapManager.onlineSideVar == 2 then
CTF_SoundEvents_Var = 2
elseif gCurrentMapManager.onlineSideVar == "EVGxGTH" or gCurrentMapManager.onlineSideVar == 3 then
CTF_SoundEvents_Var = 3
elseif gCurrentMapManager.onlineSideVar == "EVGxCOL" or gCurrentMapManager.onlineSideVar == 4 then
CTF_SoundEvents_Var = 4
end
end
if CTF_SoundEvents_Var == 1 then
gSoundEventsCTF_src = {
all = {
returned_att = "all_allFlag_returned",
returned_def = "all_impFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
imp = {
returned_att = "imp_impFlag_returned",
returned_def = "imp_allFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
rep = {
taken_att = "ssv_adm_com_report_pickup_flag",
taken_def = "ssv_adm_com_report_enemyPickup_flag",
dropped_att = "ssv_adm_com_report_drop_flag",
dropped_def = "ssv_adm_com_report_enemyDrop_flag",
returned_att = "rep_repFlag_returned",
returned_def = "rep_cisFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
cis = {
taken_att = "gth_ann_com_report_pickup_flag",
taken_def = "gth_ann_com_report_enemyPickup_flag",
dropped_att = "gth_ann_com_report_drop_flag",
dropped_def = "gth_ann_com_report_enemyDrop_flag",
returned_att = "cis_cisFlag_returned",
returned_def = "cis_repFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
}
elseif CTF_SoundEvents_Var == 2 then
gSoundEventsCTF_src = {
all = {
returned_att = "all_allFlag_returned",
returned_def = "all_impFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
imp = {
returned_att = "imp_impFlag_returned",
returned_def = "imp_allFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
rep = {
taken_att = "ssv_adm_com_report_pickup_flag",
taken_def = "ssv_adm_com_report_enemyPickup_flag",
dropped_att = "ssv_adm_com_report_drop_flag",
dropped_def = "ssv_adm_com_report_enemyDrop_flag",
returned_att = "rep_repFlag_returned",
returned_def = "rep_cisFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
cis = {
taken_att = "col_gen_com_report_pickup_flag",
taken_def = "col_gen_com_report_enemyPickup_flag",
dropped_att = "col_gen_com_report_drop_flag",
dropped_def = "col_gen_com_report_enemyDrop_flag",
returned_att = "cis_cisFlag_returned",
returned_def = "cis_repFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
}
elseif CTF_SoundEvents_Var == 3 then
gSoundEventsCTF_src = {
all = {
returned_att = "all_allFlag_returned",
returned_def = "all_impFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
imp = {
returned_att = "imp_impFlag_returned",
returned_def = "imp_allFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
rep = {
taken_att = "evg_prm_com_report_pickup_flag",
taken_def = "evg_prm_com_report_enemyPickup_flag",
dropped_att = "evg_prm_com_report_drop_flag",
dropped_def = "evg_prm_com_report_enemyDrop_flag",
returned_att = "rep_repFlag_returned",
returned_def = "rep_cisFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
cis = {
taken_att = "gth_ann_com_report_pickup_flag",
taken_def = "gth_ann_com_report_enemyPickup_flag",
dropped_att = "gth_ann_com_report_drop_flag",
dropped_def = "gth_ann_com_report_enemyDrop_flag",
returned_att = "cis_cisFlag_returned",
returned_def = "cis_repFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
}
elseif CTF_SoundEvents_Var == 4 then
gSoundEventsCTF_src = {
all = {
returned_att = "all_allFlag_returned",
returned_def = "all_impFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
imp = {
returned_att = "imp_impFlag_returned",
returned_def = "imp_allFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
taken_att = "common_flagAction_pickup",
taken_def = "common_flagAction_pickup",
dropped_att = "common_flagAction_drop",
dropped_def = "common_flagAction_drop",
},
rep = {
taken_att = "evg_prm_com_report_pickup_flag",
taken_def = "evg_prm_com_report_enemyPickup_flag",
dropped_att = "evg_prm_com_report_drop_flag",
dropped_def = "evg_prm_com_report_enemyDrop_flag",
returned_att = "rep_repFlag_returned",
returned_def = "rep_cisFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
cis = {
taken_att = "col_gen_com_report_pickup_flag",
taken_def = "col_gen_com_report_enemyPickup_flag",
dropped_att = "col_gen_com_report_drop_flag",
dropped_def = "col_gen_com_report_enemyDrop_flag",
returned_att = "cis_cisFlag_returned",
returned_def = "cis_repFlag_returned",
captured_att = "common_flagAction_score",
captured_def = "common_flagAction_score",
},
}
end
PrintLog("Exited")