Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shadowman_sharpshoot_target_Other_10

(view raw script w/o annotations or w/e)
1
hittable = 0;
2
vspeed = -12;
3
gravity = 1;
4
gravity_direction = 270;
5
hspeed = 20;
6
snd_play(snd_hitcar_little);
7
if (type == 0)
8
{
9
    with (obj_shadowman_enemy)
10
        forceacttype = 1;
11
    parentid.idlesprite = spr_shadowman_idle_bunny;
12
    parentid.sparedsprite = spr_shadowman_idle_bunny;
13
    parentid.darken = 0;
14
}
15
if (spare == true && !i_ex(obj_tenna_board4_enemy))
16
{
17
    with (parentid)
18
    {
19
        image_alpha = 0;
20
        
scr_spareanim
scr_spareanim

function
scr_spareanim()
{ spareanim = instance_create(x, y, obj_spareanim); spareanim.sprite_index = sprite_index; spareanim.sprite_index = sparedsprite; spareanim.image_index = 0; spareanim.image_xscale = image_xscale; spareanim.image_yscale = image_yscale; if (global.chapter == 3 && i_ex(obj_tennabattleconvo_controller)) { obj_tennabattleconvo_controller.enemyspared = true; snd_play(snd_crowd_ooh); } }
();
21
        
scr_recruit
scr_recruit

function
scr_recruit()
{ if (recruitable == 1 && global.flag[61 disable_recruiting] == 0) { if (global.flag[global.monstertype[myself] + 600] >= 0(None) && global.flag[global.monstertype[myself] + 600] < 1 && recruitcount > 0) { if (recruitcount == -1) {
scr_recruit_info(global.monstertype[myself]);
recruitcount = _recruitcount; } global.flag[global.monstertype[myself] + 600] += 1Enemy (placeholder/G-BODY) / recruitcount; if (global.flag[global.monstertype[myself] + 600] > 1) global.flag[global.monstertype[myself] + 600] = 1Enemy (placeholder/G-BODY); snd_play(snd_sparkle_gem); _recruitanim = instance_create(global.monsterx[myself], global.monstery[myself] - 40, obj_recruitanim); _recruitanim.firstnumber = round(global.flag[global.monstertype[myself] + 600] / (1 / recruitcount)); _recruitanim.secondnumber = recruitcount; } } }
();
22
        
scr_monsterdefeat
scr_monsterdefeat

function
scr_monsterdefeat()
{ if (global.monster[myself] == 1) { global.monstergold[3] += global.monstergold[myself]; global.monsterexp[3] += global.monsterexp[myself]; global.monster[myself] = 0; if (global.flag[51 + myself] == 0) { global.flag[51 + myself] = 2; if (global.monsterhp[myself] <= 0) global.flag[51 + myself] = 1; } if (global.flag[51 + myself] == 1) { global.flag[40 violences] += 1; if (fatal == 1) global.flag[44 kills]++; } if (global.flag[51 + myself] == 2) global.flag[41 spares] += 1; if (global.flag[51 + myself] == 3) global.flag[42 pacifies] += 1; if (global.flag[51 + myself] == 5) global.flag[43 autosusie_violences] += 1; if (global.flag[51 + myself] == 6) { global.flag[45 freezes] += 1; global.monstergold[3] += 24; } if (
scr_monsterpop() == 0)
{ _amt_add = 0; _frozened = 0; _violenced = 0; _spared = 0; _pacified = 0; for (d_i = 0; d_i < 3; d_i += 1) { if (global.flag[51 + d_i] != 0) _amt_add += 1; if (global.flag[51 + d_i] == 1) _violenced += 1; if (global.flag[51 + d_i] == 2) _spared += 1; if (global.flag[51 + d_i] == 3) _pacified += 1; if (global.flag[51 + d_i] == 6) _frozened += 1; } if (_frozened > 0) global.flag[50 last_encounter_end] = 6; if (_pacified > 0) global.flag[50 last_encounter_end] = 3; if (_spared > 0) global.flag[50 last_encounter_end] = 2; if (_violenced > 0) global.flag[50 last_encounter_end] = 1; if (global.flag[50 last_encounter_end] == 6) global.flag[926 iceshocked_encounters]++; if (global.flag[54 encounter_pointer] != 0) { global.flag[global.flag[54 encounter_pointer]] = global.flag[50 last_encounter_end]; debug_message("=====Encounter Results====="); debug_message("encounter flag: global.flag[" + string(global.flag[54 encounter_pointer]) + "]=" + string(global.flag[50 last_encounter_end])); debug_message("======="); global.flag[54 encounter_pointer] = 0; } } event_user(11); } }
();
23
        if (object_index == obj_shadowman_enemy)
24
        {
25
            x = -9999;
26
            fsiner = 0;
27
            flash = 0;
28
        }
29
    }
30
}
31
alarm[0]
 = 26;
gml_Object_obj_shadowman_sharpshoot_target_Alarm_0.gml

instance_destroy();