ScarletBlackMarket/script/sample/SampleA03.txt

102 lines
4.7 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["SampleA03"]
#Text["SampleA03<1A>N<>[Bf<42><66>g0<67><30>_j<5F>eTx0҉<30>^<5E>0 YH0<48>0>_"]
//<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);
}
@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
Obj_Delete(objEnemy);
CloseScript(GetOwnScriptID());
return;
}
}