1 |
myinteract = 1; |
2 |
if (active == 1 && pressbuffer < 0) |
3 |
timer = 0; |
4 |
if (global.facing != 0 && active == 0 && pressbuffer <= 0) |
5 |
{ |
6 |
snd_play(snd_noise); |
7 |
timer = default_time * timefactor; |
8 |
pressbuffer = 2; |
9 |
active = 1; |
10 |
if (deleteCars != 0) |
11 |
{ |
12 |
with (obj_traffic_car) |
13 |
{ |
14 |
if (place_meeting(x, y, obj_carKiller) && !scr_onscreenscr_onscreenfunction scr_onscreen(arg0)
{
obj = arg0;
spacer = 0;
if ((obj.x + obj.sprite_width + spacer) < camerax() || (obj.x - spacer) > (camerax() + 640) || (obj.y + obj.sprite_height + spacer) < cameray() || (obj.y - spacer) > (cameray() + 480))
return false;
else
return true;
} (id)) |
15 |
instance_destroy(); |
16 |
} |
17 |
} |
18 |
obj_traffic_switch.bgroupcheck = group; |
19 |
obj_traffic_switch.notme = 1; |
20 |
notme = 0; |
21 |
with (obj_traffic_switch) |
22 |
{ |
23 |
if (group == bgroupcheck && notme == 1) |
24 |
{ |
25 |
pressbuffer = 2; |
26 |
timer = default_time * timefactor; |
27 |
active = 0; |
28 |
} |
29 |
} |
30 |
if (instance_exists(obj_traffic_car)) |
31 |
obj_traffic_car.groupcheck = group; |
32 |
if (instance_exists(obj_traffic_car_generator)) |
33 |
obj_traffic_car_generator.groupcheck = group; |
34 |
if (instance_exists(obj_cybercity_bg_trafficlight_shine)) |
35 |
{ |
36 |
var group_check = group; |
37 |
with (obj_cybercity_bg_trafficlight_shine) |
38 |
{ |
39 |
if (group == group_check) |
40 |
stop = 1; |
41 |
} |
42 |
} |
43 |
if (type == 0) |
44 |
{ |
45 |
with (obj_traffic_car) |
46 |
{ |
47 |
if (group == groupcheck) |
48 |
active = 0; |
49 |
} |
50 |
with (obj_traffic_car_generator) |
51 |
{ |
52 |
if (group == groupcheck) |
53 |
active = 0; |
54 |
} |
55 |
} |
56 |
if (type == 1) |
57 |
{ |
58 |
with (obj_traffic_car) |
59 |
{ |
60 |
if (group == groupcheck) |
61 |
{ |
62 |
walking = 1; |
63 |
active = 1; |
64 |
} |
65 |
} |
66 |
with (obj_traffic_car_generator) |
67 |
{ |
68 |
if (group == groupcheck) |
69 |
{ |
70 |
walking = 1; |
71 |
active = 1; |
72 |
} |
73 |
} |
74 |
} |
75 |
if (room == room_dw_city_traffic_4 && global.plot == 80) |
76 |
{ |
77 |
with (obj_ch2_city_car_b) |
78 |
con = 0; |
79 |
} |
80 |
} |
81 |
if (type == 2) |
82 |
{ |
83 |
with (obj_traffic_car_generator) |
84 |
active = 0; |
85 |
fade = 0; |
86 |
active = 0; |
87 |
clear_traffic = true; |
88 |
if (room == room_dw_city_traffic_4 && global.plot == 85) |
89 |
{ |
90 |
with (obj_ch2_city_car_b) |
91 |
con = 0; |
92 |
} |
93 |
} |