Add effect cut options (+fix effect-related replay desyncs)

This commit is contained in:
kevinmonitor 2022-09-18 19:12:19 +07:00
parent 5effb5cfa3
commit b9c85d7580
13 changed files with 54 additions and 24 deletions

Binary file not shown.

View File

@ -73,6 +73,8 @@ task _SoundTask{
//LoadEx(lwmusic, lw, 80);
LoadEx(fire1, bullet1, 35);
LoadEx(fire2, bullet2, 35);
LoadEx(pausesfx, pause, 20);
LoadEx(extendsfx, extend, 50);
/*LoadEx(light1, lightning1, 20);
LoadEx(light2, lightning2, 20);
@ -80,14 +82,14 @@ task _SoundTask{
LoadEx(laserB, lazeB, 20);
//LoadEx(grz, graze, 20);
LoadEx(swing, slash, 20);
LoadEx(pausesfx, pause, 20);
LoadEx(choose, selection, 18);
LoadEx(thundersfx, thunder, 25);
LoadEx(charge, chargeA, 40);
LoadEx(phase, chargeB, 25);
LoadEx(fire3, bullet3, 35);
LoadEx(bombsfx, bomb, 50);
LoadEx(extendsfx, extend, 50);
LoadEx(warnsfx, lenenwarn, 30);
LoadEx(icebreak, lib ~ "se_don00.wav", 60);
LoadEx(entrance, lib ~ "se_gun00.wav", 60);*/

View File

@ -100,8 +100,9 @@ let pointerPIV = LoadAreaCommonDataValuePointer("PIV", "currentvalue", 10000);
float[] pos = GetEventArgument(0);
//int listTarget = GetEventArgument(1);
if(GetAreaCommonData("Config", "EffectCut", 0) >= 2){ObjSound_Play(sfxBoom);}
//_EffectListPreRender(PetalEffect, imgEffect, [0, 0, 256, 256]);
_ExplosionEffect(pos[0], pos[1], PetalEffect);
else{_ExplosionEffect(pos[0], pos[1], PetalEffect);}
}

View File

@ -15,9 +15,6 @@
let ITEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "ItemID", 0);
let SYSTEMID_PTR = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0);
WriteLog(ITEMID_PTR);
WriteLog(SYSTEMID_PTR);
// Code by Kevinmonitor with some assistance.
/*

View File

@ -171,7 +171,8 @@ task _DropPointItem(float[] posEnm, int killTimer, int maxTimer, int pointMin, i
}
_ScorePopup(posEnm[0], posEnm[1], "POINT", pointFinal);
if(GetAreaCommonData("Config", "EffectCut", 0) >= 1){}
else{_ScorePopup(posEnm[0], posEnm[1], "POINT", pointFinal);}
return;
@ -193,7 +194,8 @@ task _DropPIVItemEnemy(int IDPlayer, float[] posEnm, int pointMin, int pointMax,
}
_ScorePopup(posEnm[0], posEnm[1], "PIV", pointFinal);
if(GetAreaCommonData("Config", "EffectCut", 0) >= 1){}
else{_ScorePopup(posEnm[0], posEnm[1], "PIV", pointFinal);}
return;

View File

@ -64,16 +64,16 @@ task _ExplosionEffect(float enmX, float enmY, int targetList){
//TExplosionA(enmX, enmY, 255/effectLength, 9/effectLength);
/*ascent(i in 0..effectNum){
_CreatePetal(rand(5, 10)*dir, rand(5, 10)*dir, rand(0, 360));
_CreatePetal(prand(5, 10)*dir, prand(5, 10)*dir, prand(0, 360));
dir *= -1;
//_CreatePetal(rand(50, 80), rand(-80, -50), rand(0, 360));
//_CreatePetal(prand(50, 80), prand(-80, -50), prand(0, 360));
}*/
_CreatePetal(rand(8, 11), rand(-8, -11), rand(0, 360));
_CreatePetal(rand(-11, -8), rand(-2, 2), rand(0, 360));
_CreatePetal(rand(8, 8), rand(-2, 2), rand(0, 360));
_CreatePetal(rand(-11, -8), rand(8, 11), rand(0, 360));
_CreatePetal(rand(8, 11), rand(8, 11), rand(0, 360));
_CreatePetal(prand(8, 11), prand(-8, -11), prand(0, 360));
_CreatePetal(prand(-11, -8), prand(-2, 2), prand(0, 360));
_CreatePetal(prand(8, 8), prand(-2, 2), prand(0, 360));
_CreatePetal(prand(-11, -8), prand(8, 11), prand(0, 360));
_CreatePetal(prand(8, 11), prand(8, 11), prand(0, 360));
ObjSound_Play(sfxBoom);
@ -85,7 +85,7 @@ task _ExplosionEffect(float enmX, float enmY, int targetList){
float x = enmX, y = enmY;
let x_speed = spdX;
let y_speed = spdY;
let z_add = rand(-5, 5);
let z_add = prand(-5, 5);
ascent(i in 0..effectLength){
_PetalMovement(Interpolate_Decelerate(1.5, 0.5, i/effectLength), Interpolate_Decelerate(255, 0, i/effectLength));

View File

@ -29,10 +29,13 @@ int[] enmGround = [];
int[] rankAvg = [];
let SYSTEMID_PTR_2 = LoadAreaCommonDataValuePointer("ScriptID", "SystemID", 0);
// Includes ahoy
#include "script/KevinSystem/Universal_Lib.txt"
#include "script/game/99Sec_EnmLib.dnh"
#include "script/KevinSystem/kevin_system/Lib_Const.dnh"
@Initialize {
@ -60,11 +63,14 @@ int[] rankAvg = [];
//_RenderBossDaiyousei(bossObj);
SetEnemyAutoDeleteClip(165, 257, 165, 256);
//testTask();
bossTask();
mainTask();
groundTask();
curEnmManage();
//SetCommonData("Rank", 9);
//_FadeInvincibility(bossObj, 150, 150, 1);
//endingnew();
}
@ -552,12 +558,12 @@ task _BossExplosion(
//NotifyEventAll(EV_DROP_POINT_ENEMY, [enmX, enmY], timer, maxTimer, minPoint, maxPoint);
ObjSound_Play(bossBoom);
NotifyEvent(GetCommonDataPtr("SystemIDPtr", ID_INVALID), EV_EXPLODE, [enmX, enmY]);
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [enmX, enmY]);
loop(30){
//LoadEx(bossBoom, "script/game/resourceLib/bigBoom.ogg", 30 * SFXVol);
ObjSound_Play(bossBoom);
NotifyEvent(GetCommonDataPtr("SystemIDPtr", ID_INVALID), EV_EXPLODE, [shipX+rand(-240, 240), shipY+rand(-150, 150)]);
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [shipX+rand(-240, 240), shipY+rand(-150, 150)]);
wait(6);
}
@ -574,7 +580,7 @@ task _BossExplosion(
_EndShake(120, 120);
loop(120){
NotifyEvent(GetCommonDataPtr("SystemIDPtr", ID_INVALID), EV_EXPLODE, [shipX+rand(-240, 240), STG_HEIGHT+rand(0, -150)]);
NotifyEvent(GetCommonDataPtr(SYSTEMID_PTR_2, 0), EV_EXPLODE, [shipX+rand(-240, 240), STG_HEIGHT+rand(0, -150)]);
}
ObjSound_Play(bossBoom);
@ -693,6 +699,23 @@ task RankManagement(){
}
task testTask(){
wait(15);
while(ObjEnemyBossScene_GetInfo(objScene, INFO_TIMER) > 20){
//Wave4();
WaveGround1();
wait(15);
//SetCommonData("Rank", clamp(GetCommonData("Rank", 1)+1, 1, 9));
//SetCommonData("Ground Loops Cleared", GetCommonData("Ground Loops Cleared", 0)+1);
yield;
}
}
task groundTask(){
wait(15);

Binary file not shown.

Binary file not shown.

View File

@ -94,7 +94,7 @@ const EV_PIV_2000 = EV_USER + 103i; // What.
// Shot functions
SetPlayerSpell(99);
//SetPlayerSpell(99);
_CAVELaser();
_ShotType();
@ -119,10 +119,15 @@ const EV_PIV_2000 = EV_USER + 103i; // What.
// Delete effect
case(EV_DELETE_SHOT_PLAYER){
let graphic = GetEventArgument(2);
float[] position = GetEventArgument(1);
let obj = CreatePlayerShotA1(position[0], position[1], 0, ObjMove_GetAngle(GetEventArgument(0)), 0, 99999, graphic);
ObjShot_SetIntersectionEnable(obj, false); _DeleteEffect(obj, shotScale);
if(GetAreaCommonData("Config", "EffectCut", 0) >= 3){}
else{
let graphic = GetEventArgument(2);
float[] position = GetEventArgument(1);
let obj = CreatePlayerShotA1(position[0], position[1], 0, ObjMove_GetAngle(GetEventArgument(0)), 0, 99999, graphic);
ObjShot_SetIntersectionEnable(obj, false); _DeleteEffect(obj, shotScale);
}
//if(graphic == ELECTRIC_FIRE_ALT) {_DeleteEffectAlt(obj);}
//else{_DeleteEffect(obj);}
}

Binary file not shown.

0
th_dnh_ph3sx.log Normal file
View File