|
1
|
if (encountered == 0)
|
|
2
|
{
|
|
3
|
encountered = 1;
|
|
4
|
if (touchflag > 0)
|
|
5
|
global.flag[touchflag] = 1;
|
|
6
|
if (global.ambush == 1)
|
|
7
|
{
|
|
8
|
snd_play(snd_hurt1);
|
|
9
|
with (obj_mainchara)
|
|
10
|
{
|
|
11
|
fun = 1;
|
|
12
|
if (!instance_exists(obj_caterpillarchara))
|
|
13
|
scr_shakeobjscr_shakeobj
function scr_shakeobj()
{
var _shakeobj = instance_create(x, y, obj_shakeobj);
_shakeobj.target = id;
if (argument_count >= 1)
{
if (i_ex(argument0))
_shakeobj.target = argument0;
}
if (argument_count >= 2)
{
if (argument1 != -1)
_shakeobj.shakeamt = argument1;
}
if (argument_count >= 3)
{
if (argument2 != -1)
_shakeobj.shakereduct = argument2;
}
with (_shakeobj)
event_user(0);
} ();
|
|
14
|
sprite_index = spr_krisb_hurt;
|
|
15
|
}
|
|
16
|
with (obj_caterpillarchara)
|
|
17
|
{
|
|
18
|
fun = 1;
|
|
19
|
scr_shakeobjscr_shakeobj
function scr_shakeobj()
{
var _shakeobj = instance_create(x, y, obj_shakeobj);
_shakeobj.target = id;
if (argument_count >= 1)
{
if (i_ex(argument0))
_shakeobj.target = argument0;
}
if (argument_count >= 2)
{
if (argument1 != -1)
_shakeobj.shakeamt = argument1;
}
if (argument_count >= 3)
{
if (argument2 != -1)
_shakeobj.shakereduct = argument2;
}
with (_shakeobj)
event_user(0);
} ();
|
|
20
|
if (name == "susie")
|
|
21
|
sprite_index = spr_susie_shock_r;
|
|
22
|
if (name == "ralsei")
|
|
23
|
sprite_index = spr_ralsei_hurt_overworld;
|
|
24
|
}
|
|
25
|
}
|
|
26
|
global.flag[55 enemy_x] = x;
|
|
27
|
global.flag[56 enemy_y] = y;
|
|
28
|
if (washit == 1)
|
|
29
|
global.ambush = 2;
|
|
30
|
newme = instance_create(x, y, obj_testoverworldenemy);
|
|
31
|
newme.sprite_index = touchsprite;
|
|
32
|
newme.touchsprite = touchsprite;
|
|
33
|
newme.slidesprite = sprite_index;
|
|
34
|
newme.depth = depth;
|
|
35
|
newme.eraser = eraser;
|
|
36
|
newme.washit = washit;
|
|
37
|
newme.whichmonster = whichmonster;
|
|
38
|
with (newme)
|
|
39
|
event_user(0);
|
|
40
|
global.encounterno = myencounter;
|
|
41
|
instance_destroy();
|
|
42
|
}
|