174 lines
4.5 KiB
Plaintext
174 lines
4.5 KiB
Plaintext
// Valid types: PIV_100, PIV_250, PIV_500
|
|
|
|
float universalItemAlpha = GetAreaCommonData("Config", "ItemOpacity", 60);
|
|
|
|
function CreatePIVItem(itemtype, x, y){
|
|
|
|
let PIVItem = CreateItemU1(itemtype, x, y, 0);
|
|
ObjItem_SetDefaultCollectMovement(PIVItem, false);
|
|
ObjItem_SetAutoDelete(PIVItem, false);
|
|
|
|
ObjMove_SetAngle(PIVItem, 90);
|
|
ObjMove_SetSpeed(PIVItem, -10);
|
|
ObjMove_SetAcceleration(PIVItem, 1);
|
|
ObjMove_SetMaxSpeed(PIVItem, 0);
|
|
|
|
ObjItem_SetIntersectionRadius(PIVItem, 60);
|
|
|
|
ObjRender_SetScaleXYZ(PIVItem, 2);
|
|
ObjRender_SetAlpha(PIVItem, 255*(universalItemAlpha/100));
|
|
|
|
return PIVItem;
|
|
}
|
|
|
|
function CreateAmmoItem(x, y){
|
|
|
|
let Item = CreateItemU1(SPECIAL_AMMO, x, y, 0);
|
|
ObjItem_SetDefaultCollectMovement(Item, false);
|
|
ObjItem_SetAutoDelete(Item, false);
|
|
|
|
ObjMove_SetAngle(Item, 90);
|
|
ObjMove_SetSpeed(Item, -10);
|
|
ObjMove_SetAcceleration(Item, 1);
|
|
ObjMove_SetMaxSpeed(Item, 0);
|
|
|
|
ObjItem_SetIntersectionRadius(Item, 60);
|
|
|
|
ObjRender_SetScaleXYZ(Item, 3);
|
|
ObjRender_SetAlpha(Item, 255*(universalItemAlpha/100));
|
|
|
|
return Item;
|
|
}
|
|
|
|
// Valid types: POINT_REGULAR, POINT_BHESTIE, POINT_RAINBOW
|
|
function CreateScoreItem(itemtype, x, y){
|
|
|
|
let ScoreItem = CreateItemU1(itemtype, x + rand(-60, 60), y + rand(-60, 60), 0);
|
|
ObjItem_SetDefaultCollectMovement(ScoreItem, false);
|
|
ObjItem_SetAutoDelete(ScoreItem, false);
|
|
|
|
ObjItem_SetAutoCollectEnableFlags(ScoreItem, ITEM_AUTOCOLLECT_ALL);
|
|
ObjMove_SetAngle(ScoreItem, 90);
|
|
ObjMove_SetSpeed(ScoreItem, -20);
|
|
ObjMove_SetAcceleration(ScoreItem, 1);
|
|
ObjMove_SetMaxSpeed(ScoreItem, 6);
|
|
|
|
ObjItem_SetIntersectionRadius(ScoreItem, 64);
|
|
ObjItem_SetRenderScoreEnable(ScoreItem, false);
|
|
|
|
ObjRender_SetAlpha(ScoreItem, 255*(universalItemAlpha/100));
|
|
ObjRender_SetScaleXYZ(ScoreItem, 3);
|
|
|
|
/*
|
|
if(itemtype == POINT_RAINBOW){
|
|
|
|
if(LoadAreaCommonDataValuePointer("PIV", "ChainGauge", 0) <= 32){
|
|
ObjSprite2D_SetSourceRect(ScoreItem, 608, 256, 640, 288);
|
|
}
|
|
|
|
else if(LoadAreaCommonDataValuePointer("PIV", "ChainGauge", 0) > 32 && LoadAreaCommonDataValuePointer("PIV", "ChainGauge", 0) < 64){
|
|
ObjSprite2D_SetSourceRect(ScoreItem, 640, 256, 704, 320);
|
|
}
|
|
|
|
else{
|
|
ObjSprite2D_SetSourceRect(ScoreItem, 704, 256, 768, 320);
|
|
}
|
|
|
|
}
|
|
*/
|
|
|
|
return ScoreItem;
|
|
}
|
|
|
|
function CreateCancelItem(x, y){
|
|
|
|
let CancelItem = CreateItemU1(POINT_CANCEL, x, y, 0);
|
|
ObjItem_SetDefaultCollectMovement(CancelItem, false);
|
|
|
|
/*async{
|
|
wait(45);
|
|
ObjItem_SetMoveToPlayer(CancelItem, true);
|
|
ObjMove_SetMaxSpeed(CancelItem, 24);
|
|
}*/
|
|
|
|
ObjItem_SetAutoCollectEnableFlags(CancelItem, ITEM_AUTOCOLLECT_ALL);
|
|
ObjItem_SetRenderScoreEnable(CancelItem, false);
|
|
|
|
ObjItem_SetIntersectionRadius(CancelItem, 60);
|
|
|
|
ObjRender_SetScaleXYZ(CancelItem, 0.6, 0.6, 1);
|
|
ObjRender_SetAlpha(CancelItem, 255*(universalItemAlpha/100));
|
|
|
|
async{
|
|
while(!Obj_IsDeleted(CancelItem)){
|
|
float angz = ObjRender_GetAngleZ(CancelItem);
|
|
ObjRender_SetAngleZ(CancelItem, angz+2);
|
|
yield;
|
|
}
|
|
}
|
|
|
|
return CancelItem;
|
|
|
|
}
|
|
// Valid types: EXTEND_LIFE, EXTEND_SPELL
|
|
function CreateExtendItem(itemtype, x, y){
|
|
|
|
let ExtendItem = CreateItemU2(itemtype, x, y, x, y-125, 0);
|
|
ObjItem_SetDefaultCollectMovement(ExtendItem, false);
|
|
//ObjItem_SetMoveToPlayer(ExtendItem, true);
|
|
ObjItem_SetAutoCollectEnableFlags(ExtendItem, ITEM_AUTOCOLLECT_ALL);
|
|
|
|
ObjMove_SetAngle(ExtendItem, 90);
|
|
ObjMove_SetSpeed(ExtendItem, -20);
|
|
ObjMove_SetAcceleration(ExtendItem, 1);
|
|
ObjMove_SetMaxSpeed(ExtendItem, 0);
|
|
|
|
ObjRender_SetScaleXYZ(ExtendItem, 1.5, 1.5, 1);
|
|
Obj_SetRenderPriorityI(ExtendItem, 49);
|
|
ObjItem_SetAutoDelete(ExtendItem, false);
|
|
|
|
/*async{
|
|
wait(30);
|
|
ObjItem_SetMoveToPlayer(ExtendItem, true);
|
|
//ObjMove_SetMaxSpeed(CancelItem, 24);
|
|
}*/
|
|
|
|
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{}
|
|
|
|
}
|