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_shakeobjfunction scr_shakeobj()
{
shakeobj = instance_create(x, y, obj_shakeobj);
shakeobj.target = id;
with (shakeobj)
event_user(0);
} (); |
14 |
sprite_index = spr_krisb_hurt; |
15 |
} |
16 |
with (obj_caterpillarchara) |
17 |
{ |
18 |
fun = 1; |
19 |
scr_shakeobjscr_shakeobjfunction scr_shakeobj()
{
shakeobj = instance_create(x, y, obj_shakeobj);
shakeobj.target = id;
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 |
} |