Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_berdlyb_enemy_Other_20

(view raw script w/o annotations or w/e)
1
scr_act_charsprite_end
scr_act_charsprite_end

function scr_act_charsprite_end() { for (i = 0; i < 10; i++) { with (_charactsprite[i]) instance_destroy(); } with (obj_heroparent) { if (image_alpha == 0) { image_alpha = 1; acttimer = 0; state = 0; global.faceaction[myself] = 0; } } }
();
2
scr_nextact
scr_nextact

function scr_nextact() { global.acting[0] = 0; global.acting[1] = 0; global.acting[2] = 0; global.actingsingle[global.currentactingchar] = 0; __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; with (__minstance) { acting = 0; actcon = 0; actconsus = 0; actconral = 0; actconnoe = 0; } var singleactcomplete = 0; while (global.currentactingchar < 3) { global.currentactingchar++; if (global.currentactingchar < 3) { if (global.actingsingle[global.currentactingchar] == 1) { __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; if (global.char[global.currentactingchar] == 2) { with (__minstance) actconsus = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 3) { with (__minstance) actconral = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 4) { with (__minstance) actconnoe = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } } } } if (global.currentactingchar >= 3) { with (obj_monsterparent) { acting = 0; actingsus = 0; actingral = 0; actingnoe = 0; } global.currentactingchar = 0; scr_attackphase(); } else if (!singleactcomplete) { scr_act_simul(); } }
();
3
scr_wincombat
scr_wincombat

function scr_wincombat() { if (global.flag[60 dojo_next_encounter] == 0 || global.flag[36 dojo_failure] == 1) { global.myfight = 7; global.mnfight = -1; with (obj_battlecontroller) victory = 1; for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } } else { for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } global.encounterno = global.flag[60 dojo_next_encounter]; scr_encountersetup(global.encounterno); global.flag[60 dojo_next_encounter] = 0; for (__j = 0; __j < 3; __j++) { if (global.monstertype[__j] != 0(None)) { _newmonster = scr_monster_add(global.monstertype[__j], global.monsterinstancetype[__j]); global.monsterinstance[_newmonster].x = camerax() + 800; global.monsterinstance[_newmonster].y = global.monstermakey[__j]; with (global.monsterinstance[_newmonster]) scr_move_to_point_over_time(global.monstermakex[myself], global.monstermakey[myself], 10); } } global.myfight = 5; myfightreturntimer = 15; global.mnfight = -1; } }
();