1 |
var dbox = obj_dialogue_box_battle_transformation_any |
2 |
damage_number = scr_determine_damage_number_enemyscr_determine_damage_number_enemyfunction scr_determine_damage_number_enemy(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy
{
var enemy_count = global.enemy_count
if (global.battle_enemy_name_1 == argument0)
return 1;
else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1)
return 2;
else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2)
return 3;
else
return 0;
} ("tellyvis a", "void", "void") |
3 |
flying_speed = 10 |
4 |
grav_speed = 0 |
5 |
depth = obj_heart_battle_fighting_parent.depth - 1 |
6 |
var spawn_position = irandom_range(1, 4) |
7 |
var half_width = sprite_width * 0.5 |
8 |
var half_height = sprite_height * 0.5 |
9 |
var loop_prevention = 0 |
10 |
do |
11 |
{ |
12 |
switch spawn_position |
13 |
{ |
14 |
case 1: |
15 |
x = obj_heart_battle_fighting_parent.x |
16 |
if (loop_prevention >= 1) |
17 |
x = irandom_range((dbox.bbox_left + half_width), (dbox.bbox_right - half_width)) |
18 |
y = dbox.bbox_top - half_height |
19 |
direction = 270 |
20 |
break |
21 |
case 2: |
22 |
x = obj_heart_battle_fighting_parent.x |
23 |
if (loop_prevention >= 1) |
24 |
x = irandom_range((dbox.bbox_left + half_width), (dbox.bbox_right - half_width)) |
25 |
y = dbox.bbox_bottom + half_height |
26 |
direction = 90 |
27 |
break |
28 |
case 3: |
29 |
y = obj_heart_battle_fighting_parent.y |
30 |
if (loop_prevention >= 1) |
31 |
y = irandom_range((dbox.bbox_top + half_height), (dbox.bbox_bottom - half_width)) |
32 |
x = dbox.bbox_left - half_height |
33 |
direction = 0 |
34 |
image_angle = 90 |
35 |
break |
36 |
case 4: |
37 |
y = obj_heart_battle_fighting_parent.y |
38 |
if (loop_prevention >= 1) |
39 |
y = irandom_range((dbox.bbox_top + half_height), (dbox.bbox_bottom - half_width)) |
40 |
x = dbox.bbox_right + half_height |
41 |
direction = 180 |
42 |
image_angle = 90 |
43 |
break |
44 |
} |
45 |
|
46 |
loop_prevention += 1 |
47 |
} until ((!(place_meeting(x, y, obj_battle_enemy_attack_tellyvis_tape))) || loop_prevention >= 4); |
48 |
x_previous = x |
49 |
y_previous = y |
50 |
peek_distance = 20 |
51 |
cutscene_timer = 0 |
52 |
scene = 0 |