-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathold.del
146 lines (110 loc) · 4.41 KB
/
old.del
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
// import "helper.del";
// import "debug.del";
// enum Ability {
// Ability1 = 1,
// Ability2 = 2,
// PrimaryFire = 4,
// SecondaryFire = 8,
// Melee = 16,
// Ultimate = 32
// }
// struct PlayerData {
// public Vector position;
// public Vector facingDirection;
// public Hero hero;
// public define abilityFlag = 0;
// public define isAlive = false;
// public define health;
// }
// //structure: data[0][0] is player data for the first player on team 1 for round 1
// rule: "Performance enhancements"
// Event.OngoingPlayer
// if(IsInSetup()){
// currentRound_alives[999] = 0;
// currentRound_positions[999] = 0;
// currentRound_directions[999] = 0;
// currentRound_heroes[999] = 0;
// currentRound_healths[999] = 0;
// currentRound_abilityFlags[999] = 0;
// Wait(SlotOf(EventPlayer())/3);
// currentRound_alives = MappedArray(currentRound_alives, true);
// currentRound_positions = MappedArray(currentRound_alives, Vector());
// currentRound_directions = MappedArray(currentRound_alives, Vector());
// currentRound_heroes = MappedArray(currentRound_alives, Hero.Ana);
// }
// playervar define currentRound_alives = [];
// playervar define currentRound_positions = [];
// playervar define currentRound_directions = [];
// playervar define currentRound_heroes = [];
// playervar define currentRound_healths = [];
// playervar define currentRound_abilityFlags = [];
// rule: "Loop for every player once every x ticks"
// Event.OngoingPlayer
// if(IsGameInProgress())
// {
// define saveTick = 0;
// define isAlive = IsAlive(EventPlayer);
// define abilityFlag = 0;
// currentRound_alives[saveTick] = isAlive;
// if(isAlive) {
// currentRound_positions[saveTick] = EP_Position;
// currentRound_directions[saveTick] = EP_Direction;
// currentRound_heroes[saveTick] = EP_Hero;
// currentRound_healths[saveTick] = EP_Health;
// abilityFlag += IsUsingAbility1()*Ability.Ability1;
// abilityFlag += IsUsingAbility2()*Ability.Ability2;
// abilityFlag += IsFiringPrimary()*Ability.PrimaryFire;
// abilityFlag += IsFiringSecondary()*Ability.SecondaryFire;
// abilityFlag += IsMeleeing()*Ability.Melee;
// abilityFlag += IsUsingUltimate()*Ability.Ultimate;
// currentRound_abilityFlags[saveTick] = abilityFlag;
// }
// WaitTicks(6);
// saveTick++;
// LoopIfConditionIsTrue();
// }
// globalvar define data_alive = [];
// globalvar define data_position = [];
// globalvar define data_direction = [];
// globalvar define data_hero = [];
// globalvar define data_health = [];
// globalvar define data_abilityFlag = [];
// rule: "Consolidate data at end of round"
// Event.OngoingPlayer
// if(IsBetweenRounds() || IsMatchComplete())
// {
// define currentRound = MatchRound() - 1;
// define playersArray = AllPlayers();
// define playersArrayCount = CountOf(playersArray);
// define p_i = SlotOf(EventPlayer()) + (TeamOf(EventPlayer()) == Team.Team2 ? 6 : 0);
// if(p_i == 0) {
// data_alive[currentRound] = [];
// data_position[currentRound] = [];
// data_direction[currentRound] = [];
// data_health[currentRound] = [];
// data_hero[currentRound] = [];
// data_abilityFlag[currentRound] = [];
// }
// else WaitTicks(2);
// data_alive[currentRound] = [];
// data_position[currentRound] = [];
// data_direction[currentRound] = [];
// data_health[currentRound] = [];
// data_hero[currentRound] = [];
// data_abilityFlag[currentRound] = [];
// define tickCount = CountOf(EventPlayer.currentRound_alives);
// for(define j! = 0; j < tickCount; j++){
// define isAlive = EventPlayer.currentRound_alives[j];
// if(!isAlive){
// data_alive[currentRound][p_i] = false;
// continue;
// }
// data_position[currentRound][p_i] = EventPlayer.currentRound_positions[j];
// data_direction[currentRound][p_i] = EventPlayer.currentRound_directions[j];
// data_hero[currentRound][p_i] = EventPlayer.currentRound_heroes[j];
// data_abilityFlag[currentRound][p_i] = EventPlayer.currentRound_abilityFlags[j];
// data_alive[currentRound][p_i] = isAlive;
// data_health[currentRound][p_i] = EventPlayer.currentRound_healths[j];
// if(j%7 == 0) MinWait();
// }
// }