92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
|
// Valid types: PIV_100, PIV_250, PIV_500
|
||
|
|
||
|
function CreatePIVItem(itemtype, x, y){
|
||
|
let PIVItem = CreateItemU2(itemtype, x, y, x-10, y-10, 100);
|
||
|
|
||
|
ObjItem_SetMoveToPlayer(PIVItem, true);
|
||
|
ObjItem_SetAutoDelete(PIVItem, false);
|
||
|
|
||
|
ObjItem_SetAutoCollectEnableFlags(PIVItem, ITEM_AUTOCOLLECT_ALL);
|
||
|
ObjItem_SetRenderScoreEnable(PIVItem, false);
|
||
|
|
||
|
ObjItem_SetIntersectionRadius(PIVItem, 60);
|
||
|
|
||
|
ObjRender_SetScaleXYZ(PIVItem, 0.3, 0.3, 1);
|
||
|
ObjRender_SetAlpha(PIVItem, 125);
|
||
|
|
||
|
async{
|
||
|
while(!Obj_IsDeleted(PIVItem)){
|
||
|
float angz = ObjRender_GetAngleZ(PIVItem);
|
||
|
ObjRender_SetAngleZ(PIVItem, angz+5);
|
||
|
yield;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return PIVItem;
|
||
|
}
|
||
|
|
||
|
// Valid types: POINT_REGULAR, POINT_BHESTIE
|
||
|
function CreateScoreItem(itemtype, x, y){
|
||
|
let ScoreItem = CreateItemU2(itemtype, x, y, x-30, y-30, 0);
|
||
|
|
||
|
ObjItem_SetAutoCollectEnableFlags(ScoreItem, ITEM_AUTOCOLLECT_ALL);
|
||
|
ObjItem_SetAutoDelete(ScoreItem, false);
|
||
|
|
||
|
ObjItem_SetIntersectionRadius(ScoreItem, 60);
|
||
|
ObjItem_SetRenderScoreEnable(ScoreItem, false);
|
||
|
|
||
|
ObjRender_SetScaleXYZ(ScoreItem, 0.4, 0.4, 1);
|
||
|
ObjRender_SetAlpha(ScoreItem, 200);
|
||
|
|
||
|
ObjMove_AddPatternA2(ScoreItem, 60, NO_CHANGE, 90, 0.12, 5.45, 0);
|
||
|
|
||
|
return ScoreItem;
|
||
|
}
|
||
|
|
||
|
// Valid types: EXTEND_LIFE, EXTEND_SPELL
|
||
|
function CreateExtendItem(itemtype, x, y){
|
||
|
|
||
|
let ExtendItem = CreateItemU2(itemtype, x, y, x-15, y-15, 0);
|
||
|
ObjItem_SetMoveToPlayer(ExtendItem, true);
|
||
|
ObjItem_SetAutoCollectEnableFlags(ExtendItem, ITEM_AUTOCOLLECT_ALL);
|
||
|
|
||
|
ObjRender_SetScaleXYZ(ExtendItem, 0.5, 0.5, 1);
|
||
|
|
||
|
return ExtendItem;
|
||
|
}
|
||
|
|
||
|
// Summoning the actual items
|
||
|
|
||
|
function NonspellItemDrop(scene, x, y){
|
||
|
|
||
|
if(ObjEnemyBossScene_GetInfo(scene, INFO_PLAYER_SHOOTDOWN_COUNT) == 0){
|
||
|
loop(14){
|
||
|
CreateScoreItem(POINT_REGULAR, x+rand(-75, 75), y+rand(-45, 45));
|
||
|
}
|
||
|
}
|
||
|
else{
|
||
|
loop(8){
|
||
|
CreateScoreItem(POINT_REGULAR, x+rand(-75, 75), y+rand(-45, 45));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
function SpellItemDrop(scene, x, y){
|
||
|
|
||
|
if(ObjEnemyBossScene_GetInfo(scene, INFO_PLAYER_SHOOTDOWN_COUNT) == 0 && ObjEnemyBossScene_GetInfo(scene, INFO_PLAYER_SPELL_COUNT) == 0){
|
||
|
loop(20){
|
||
|
CreateScoreItem(POINT_BHESTIE, x+rand(-75, 75), y+rand(-45, 45));
|
||
|
}
|
||
|
loop(10){
|
||
|
CreateScoreItem(POINT_REGULAR, x+rand(-75, 75), y+rand(-45, 45));
|
||
|
}
|
||
|
}
|
||
|
else if(ObjEnemyBossScene_GetInfo(scene, INFO_PLAYER_SHOOTDOWN_COUNT) == 0 && ObjEnemyBossScene_GetInfo(scene, INFO_PLAYER_SPELL_COUNT) >> 0){
|
||
|
loop(12){
|
||
|
CreateScoreItem(POINT_REGULAR, x+rand(-75, 75), y+rand(-45, 45));
|
||
|
}
|
||
|
}
|
||
|
else{}
|
||
|
|
||
|
}
|