-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathad.gsc
executable file
·46 lines (42 loc) · 883 Bytes
/
ad.gsc
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
addAd(ad, scale, color)
{
if ( ! isDefined(level.ad))
level.ad = [];
i = level.ad.size;
level.ad[i] = spawnstruct();
level.ad[i].ad = ad;
level.ad[i].scale = scale;
level.ad[i].color = color;
}
precache()
{
for (i=0; i<level.ad.size; i++)
precacheString(level.ad[i].ad);
}
ad()
{
level.hud_ad = newHudElem();
level.hud_ad.horzAlign = "fullscreen";
level.hud_ad.vertAlign = "fullscreen";
level.hud_ad.alignX = "center";
level.hud_ad.alignY = "top";
level.hud_ad.x = 320;
level.hud_ad.y = 380;
level.hud_ad.alpha = 0;
wait 10;
while (1)
{
for (i=0; i<level.ad.size; i++)
{
level.hud_ad.fontscale = level.ad[i].scale;
level.hud_ad.color = level.ad[i].color;
level.hud_ad fadeOverTime(1);
level.hud_ad.alpha = 1;
level.hud_ad.label = level.ad[i].ad;
wait 10;
level.hud_ad fadeOverTime(1);
level.hud_ad.alpha = 0;
wait 20;
}
}
}