Full boss battle (with music) implemented.

This commit is contained in:
kevinmonitor 2022-08-22 22:05:46 +07:00
parent 97eb85483c
commit af1977159c
28 changed files with 82 additions and 16 deletions

View file

@ -8,12 +8,26 @@
let csd = GetCurrentScriptDirectory();
let obj = ObjEnemyBossScene_Create();
int objBGM = ObjSound_Create();
#include "script/KevinSystem/Universal_Lib.txt"
#include "script/game/Stage_Background.dnh"
bool bossTrueStart = false;
float BGMRate = GetAreaCommonData("Config", "BGMVol", 100) * 0.01;
@Event{
alternative (GetEventType())
case(EV_PAUSE_ENTER){
if (bossTrueStart) {ObjSound_Stop(objBGM);}
}
case(EV_PAUSE_LEAVE){
if (bossTrueStart) {ObjSound_Play(objBGM);}
}
}
@Initialize{
@ -25,7 +39,15 @@ let obj = ObjEnemyBossScene_Create();
else{}
SetAutoDeleteObject(true);
_ScrollBackground();
ObjSound_Load(objBGM, "script/game/resourceLib/bossTheme.ogg");
ObjSound_SetSoundDivision(objBGM, SOUND_BGM);
ObjSound_SetResumeEnable(objBGM, true);
ObjSound_SetLoopEnable(objBGM, true);
ObjSound_SetLoopTime(objBGM, 0.00, 89.618);
ObjSound_SetVolumeRate(objBGM, 99*BGMRate);
PluralTask();
}
@ -55,14 +77,22 @@ task PluralTask(){
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non3.dnh");
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell3.dnh");
_ScrollBackground();
// Loading and registering the boss scene
ObjEnemyBossScene_LoadInThread(obj);
ObjEnemyBossScene_Regist(obj);
bossTrueStart = true;
ObjSound_Play(objBGM);
while(!Obj_IsDeleted(obj)){
yield;
}
ObjSound_Stop(objBGM);
bossTrueStart = false;
_ExplosionEffect(GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_WIDTH/2), PetalEffect);
SetAutoDeleteObject(true);
wait(120);

View file

@ -69,7 +69,7 @@ int[] speedSpiral = [6, 8, 8];
bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist(bossObj);
ObjMove_SetPosition(bossObj, GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_HEIGHT/2));
ObjMove_SetPosition(bossObj, STG_WIDTH/2, -256);
ObjEnemy_SetMaximumDamage(bossObj, 999);
_RenderBoss(bossObj);

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

@ -1,11 +1,15 @@
let bossBG = "script/game/resourceLib/BGFight.png";
let sound = ObjSound_Create();
let soundWarn = ObjSound_Create();
let alphaMax = 255*((GetAreaCommonData("Config", "BGOpacity", 100))/100);
let blipVol = GetAreaCommonData("Config", "SEVol", 100) * 0.01;
ObjSound_Load(sound, "script/game/resourceLib/dialogueblip.wav");
ObjSound_Load(soundWarn, "script/game/resourceLib/warnSound.wav");
ObjSound_SetVolumeRate(sound, 100 * blipVol);
ObjSound_SetVolumeRate(soundWarn, 100 * blipVol);
ObjSound_SetSoundDivision(sound, SOUND_SE);
ObjSound_SetSoundDivision(soundWarn, SOUND_SE);
//LoadSound("script/game/StageLib/dialogueblip.wav");
@ -17,8 +21,8 @@ function <void> _ScrollBackground(){
ObjRender_SetPosition(BossImg, STG_WIDTH/2, STG_HEIGHT/2-150, 0);
Obj_SetRenderPriorityI(BossImg, 24);
ascent(i in 0..30){
ObjRender_SetAlpha(BossImg, Interpolate_Decelerate(0, alphaMax, i/30));
ascent(i in 0..90){
ObjRender_SetAlpha(BossImg, Interpolate_Decelerate(0, alphaMax, i/90));
yield;
}
@ -28,21 +32,53 @@ function <void> _ScrollBackground(){
}
function <void> Dialogue(){
ObjSound_Play(soundWarn);
wait(30);
int objText3 = CreateTextObject(
STG_WIDTH/2, STG_HEIGHT/3-60, 90,
" ", "Origami Mommy",
0xFF0031, 0xFF0031,
0x000000, 10,
71
);
int objText = CreateTextObject(
STG_WIDTH/2, 2*STG_HEIGHT/5+125, 45,
STG_WIDTH/2, STG_HEIGHT/2-60, 45,
" ", "Origami Mommy",
0x9F9FFF, 0xDCD6FF,
0x000000, 3,
0xAA0020, 0xF18FA2,
0x390E2E, 6,
71
);
int objText2 = CreateTextObject(
STG_WIDTH/2, STG_HEIGHT/2+60, 45,
" ", "Origami Mommy",
0xAA0020, 0xF18FA2,
0x390E2E, 6,
71
);
ObjText_SetHorizontalAlignment(objText, ALIGNMENT_CENTER);
TTextScroll(objText, "AN AWESOME VAMPIRE/IS CONFLICT WITH US//KEEP YOUR SEXINESS");
ObjText_SetHorizontalAlignment(objText2, ALIGNMENT_CENTER);
ObjText_SetHorizontalAlignment(objText3, ALIGNMENT_CENTER);
TTextScroll(objText3, "WARNING");
TTextScroll(objText, "AN AWESOME VAMPIRE/IS CONFLICT WITH US");
//wait(60);
TTextScroll(objText2, "KEEP YOUR SEXINESS");
Obj_Delete(objText);
Obj_Delete(objText2);
Obj_Delete(objText3);
}
@ -82,6 +118,6 @@ function <void> TTextScroll(int obj_, string text_) { //Makes text fill graduall
}
dialogEnd = true;
wait(90);
wait(30);
}

BIN
script/game/config.dat Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

After

Width:  |  Height:  |  Size: 586 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.