ScarletBlackMarket/script/sample/SampleE01.txt

167 lines
8.5 KiB
Plaintext
Raw Permalink Normal View History

2022-08-20 05:42:00 +00:00
<EFBFBD><EFBFBD>#qg<71>e>_U^<5E><>[Single]
#ScriptVersion[3]
#Title["SampleE01"]
#Text["SampleE01<1A><>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0"]
#Background["script/default_system/Default_Background_IceMountain.txt"]
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0>_;u<>P<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
#include"script/default_system/Default_ShotConst.txt"
//----------------------------------------------------
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0 Ype<70>[<00>
//S0n0MOng0<67>[<00>W0_0 Ypeo0<6F>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0hQSOg0 g<>Rg0Y00
//_0`0W0S0n0<6E>{@bg0n0 Ypex0n0<6E>NeQo00<>[pe<70>NYn0<6E>NeQo0L<30>H0~0[0<>00
//(<00>[L<><06><>^L0<4C>O<EFBFBD><4F>U0<55>0j0D0_0<5F>0qNpej0i0n0O(uo0g0M0~0[0<>0)
//----------------------------------------------------
let objEnemy; //ue<75>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
let objPlayer; //<00><>_j<5F>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
let frame = 0; //ue<75>R\Ok0O(uY0<59>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0(@MainLoopg01e0d0<64>X<EFBFBD>RU0[0~0Y0)
//----------------------------------------------------
//uen0<6E>R\O
//----------------------------------------------------
@Event
{
alternative(GetEventType())
case(EV_REQUEST_LIFE)
{
//ue<75>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD><30>BlU0<55>0_0
SetScriptResult(500);//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0500k0-<2D><>[
}
}
@Initialize
{
//<00><>_j<5F>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>S<EFBFBD>_
objPlayer = GetPlayerObjectID();
//ue<75>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0ubW0{v2<76>
objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
ObjEnemy_Regist(objEnemy);
//ue;u<>Pn0-<2D><>[
let imgExRumia = GetCurrentScriptDirectory ~ "ExRumia.png"; //ue;u<>P<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
ObjPrim_SetTexture(objEnemy, imgExRumia); //;u<>P<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD><30>0<7F><30><EFBFBD>0
ObjSprite2D_SetSourceRect(objEnemy, 64, 1, 127, 64); //<00>c;uCQ<43>wb_<62>0(64,1) - (127,64)k0-<2D><>[
ObjSprite2D_SetDestCenter(objEnemy); //<00>c;uHQ<48>0-N<>_(0, 0)k0-<2D><>[
//<00>^j(cx, 120)x060<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0K0Q0f0<66>y<EFBFBD>RY0<59>0
let cx = GetStgFrameWidth() / 2;//STG<00>0<EFBFBD>0<EFBFBD>0n0-N<>_x<00>^j<>0<EFBFBD>S<EFBFBD>_
ObjMove_SetDestAtFrame(objEnemy, cx, 120, 60);
TMotionBlur();
}
@MainLoop
{
//uen0<6E>^j<>0<EFBFBD>S<EFBFBD>_
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
if(frame == 180)
{
//frameL0180k0j0c0_0<5F>0<EFBFBD>[L<>U0<55>0<EFBFBD>0<EFBFBD><30>R
//<00><>_jn0<6E>^j<>0<EFBFBD>S<EFBFBD>_
let px = GetPlayerX();
let py = GetPlayerY();
//ueK0<4B>00_0<5F><30>_j<5F>eTn0҉<30>^<5E>0Bl<42>0<EFBFBD>00
let angleToPlayer = atan2(py - ey, px - ex);
//angle<00>0-30K0<4B>015Z0d0<64>X<EFBFBD>RU0[05WAYk0Y0<59>0
let angle=0;
while(angle<360)
{//(angle<1A>15<00><00><><EFBFBD><EFBFBD>g00^<5E>360~0g0)
//N<>[Bf<42><66>g0<67><30>_j<5F>eTx0҉<30>^<5E>0 YH0<48>0>_
//>_<>0\ObY0<59>00
let obj = CreateShotA2(ex, ey, 5, angle, -0.10, 1, DS_RICE_S_BLUE, 30);
//zv\<5C>_60<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>vk00<><30>_j<5F>eT<>0<EFBFBD>W<EFBFBD>nk0҉<30>^ Y<>fY0<59>0<EFBFBD>0F0k0-<2D><>[
ObjMove_AddPatternA4(obj, 60, 3, 0, 0, 0, 3, objPlayer, NO_CHANGE);
angle += 15;
}
frame = 0;//>_<>0<EFBFBD>QW0_0<5F>0frame<00>00k0Y0<59>0
}
//S__0<5F>0$R<>[{v2<76>
ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32);//S__0<5F>0$R<>[(<00><>_j>_(u){v2<76>
ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ex, ey, 24);//S__0<5F>0$R<>[(SOS__0<5F>0(u){v2<76>
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0k01<00><><EFBFBD>R
frame++;
//<00>0<EFBFBD>0<EFBFBD>00<00>Qt
if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) <= 0)
{
//<00>0<EFBFBD>0<EFBFBD>0L00k0j0c0_0<5F>0sS<73>^k0B}<7D>N
//,gego0rzv<7A>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0n0<6E>0<EFBFBD>0<EFBFBD>0<EFBFBD>0{v2<76>W00
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0B}<7D>N<EFBFBD>0<EFBFBD>_c0f00<>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0B}<7D>NW0~0Y00
yield;
Obj_Delete(objEnemy);
CloseScript(GetOwnScriptID());
return;
}
yield;
}
//----------------------------------------------------
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
//----------------------------------------------------
task TMotionBlur()
{
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0k0O(uY0<59>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
let renderTexture = [GetReservedRenderTargetName(0), GetReservedRenderTargetName(1)];
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0g0n0<6E>c;ug0~0K0j0H0<48>0_0<5F>00
//*QHQ<48>^20^<5E>79n0<1A>8^<5E>c;u<>0!q<>Rk0Y0<59>00
SetInvalidRenderPriorityA1(20, 79);
//<00>s<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>c;uY0<59>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
let objCurentFrame = ObjPrim_Create(OBJ_SPRITE_2D);
Obj_SetRenderPriorityI(objCurentFrame, 80);//*QHQ<48>^80k0<6B>c;uY0<59>0
ObjRender_SetPermitCamera(objCurentFrame, false);
//N<><4E>S<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0(u<>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0
let objOldFrame = ObjPrim_Create(OBJ_SPRITE_2D);
Obj_SetRenderPriorityI(objOldFrame, 0);
ObjRender_SetPermitCamera(objOldFrame, false);
ObjRender_SetAlpha(objOldFrame, 224);//<00>$Po0<6F>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0n07_U0k0j0<6A>0~0Y0
Obj_SetVisible(objOldFrame, false);//N<><4E>S<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0(uj0n0g0<1A>8^n0<6E>c;uL0U0<55>0j0D0<44>0F0k0W0~0Y00
//<00>0<EFBFBD>0n0<6E>0<EFBFBD>0<EFBFBD>0L00k0j0<6A>0~0g0<67>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0K0Q0<51>00
let frame = 0;
while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0)
{
let currentFrameTexture = renderTexture[frame % 2];
//*QHQ<48>^20^<5E>79(STG<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0hQSO)<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0k0<6B>c;uY0<59>00
RenderToTextureA1(currentFrameTexture, 20, 79, true);
if(frame >= 1)
{
//MR<4D>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>s<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0k0JS<0F>f<>c;u
//0<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>vo0MR<4D>0<EFBFBD>0<EFBFBD>0<EFBFBD>0L0j0D0_0<5F>0S0n0<6E>Qto0L<30><4C>0j0D00
let oldFrameTexture = renderTexture[(frame - 1) % 2];
ObjPrim_SetTexture(objOldFrame, oldFrameTexture);
ObjSprite2D_SetSourceRect(objOldFrame, 32, 16, 416, 464);
ObjSprite2D_SetDestRect(objOldFrame, 32, 16, 416, 464);
RenderToTextureB1(currentFrameTexture, objOldFrame, false);
}
//<00>s<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>c;u(u<>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0-<2D><>[
ObjPrim_SetTexture(objCurentFrame, currentFrameTexture);
ObjSprite2D_SetSourceRect(objCurentFrame, 32, 16, 416, 464);
ObjSprite2D_SetDestRect(objCurentFrame, 32, 16, 416, 464);
frame++;
yield;
}
//<00>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0(u<>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0<EFBFBD>0JRd<52>
Obj_Delete(objCurentFrame);
Obj_Delete(objOldFrame);
ClearInvalidRenderPriority();
}