1 |
function scr_endcombat_ch1scr_endcombat_ch1function scr_endcombat_ch1()
{
global.fighting = 0;
if (global.specialbattle == 0 || global.specialbattle == 2 || global.specialbattle == 3)
{
if (global.specialbattle == 2)
{
with (obj_mainchara_ch1)
{
cutscene = 1;
x = global.charinstance[0].x;
y = global.charinstance[0].y;
}
with (global.cinstance[0])
{
x = global.charinstance[1].x;
y = global.charinstance[1].y;
}
with (global.cinstance[1])
{
x = global.charinstance[2].x;
y = global.charinstance[2].y;
}
with (obj_caterpillarchara_ch1)
scr_caterpillar_interpolate_ch1();
scr_pan_to_obj_ch1(obj_mainchara_ch1, 30);
with (obj_mainchara_ch1)
visible = 1;
with (obj_caterpillarchara_ch1)
visible = 1;
}
instance_create_ch1(0, 0, obj_endbattle_ch1);
with (obj_monsterparent_ch1)
instance_destroy();
with (obj_bulletparent_ch1)
instance_destroy();
with (obj_heroparent_ch1)
instance_destroy();
instance_destroy();
}
} () |
26 |
scr_pan_to_obj_ch1scr_pan_to_obj_ch1function scr_pan_to_obj_ch1(arg0, arg1)
{
_wd = arg0.x - floor((__view_get(e__VW.WView, 0) / 2) - (arg0.sprite_width / 2));
_ht = arg0.y - floor((__view_get(e__VW.HView, 0) / 2) - (arg0.sprite_height / 2));
_vx = _wd;
_vy = _ht;
if (_vx < 0)
_vx = 0;
if (_vx > (room_width - _vx))
_vx = room_width - _vx;
if (_vy < 0)
_vy = 0;
if (_vy > (room_height - __view_get(e__VW.HView, 0)))
_vy = room_height - __view_get(e__VW.HView, 0);
scr_pan_ch1((_vx - __view_get(e__VW.XView, 0)) / arg1, (_vy - __view_get(e__VW.YView, 0)) / arg1, arg1);
}
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID
} (obj_mainchara_ch1, 30); |