Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task TSpell
- {
- SetPlayerInvincibilityFrame(300);
- let objManage = GetSpellManageObject();
- let spellgraphic = GetCurrentScriptDirectory~"marisa_bomb_a.png";
- let angle = 0;
- loop(3)
- {
- Spiral(angle, 15);
- angle+=120;
- }
- loop(220)
- {
- yield;
- }
- Obj_Delete(objManage);
- task Spiral(angle, a)
- {
- let dist = 0;
- let x = (GetStgFrameWidth/2)+dist*cos(angle);
- let y = (GetStgFrameHeight/2)+dist*sin(angle);
- let frame = 0;
- while(!IsOffScreen(x, y))
- {
- x = (GetStgFrameWidth/2)+dist*cos(angle);
- y = (GetStgFrameHeight/2)+dist*sin(angle);
- if(frame%5==0 && frame > 0)
- {
- Star(x, y);
- }
- dist+=5;
- angle+=a;
- frame++;
- }
- }
- task Star(x, y)
- {
- let obj = ObjSpell_Create();
- ObjSpell_SetEraseShot(obj, true);
- ObjSpell_SetDamage(obj, 10);
- ObjPrim_SetVertexCount(obj, 4);
- ObjPrim_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
- ObjPrim_SetTexture(obj, spellgraphic);
- ObjPrim_SetVertexUV(obj, 0, 0.0, 0.0);
- ObjPrim_SetVertexUV(obj, 1, 1.0, 0.0);
- ObjPrim_SetVertexUV(obj, 2, 0.0, 1.0);
- ObjPrim_SetVertexUV(obj, 3, 1.0, 1.0);
- ObjRender_SetPosition(obj, x, y, 0);
- ObjSpell_SetIntersectionCircle(obj, x, y, 10);
- ObjPrim_SetVertexPosition(obj, 0, x-50, y-50, 0);
- ObjPrim_SetVertexPosition(obj, 1, x+50, y-50, 0);
- ObjPrim_SetVertexPosition(obj, 2, x-50, y+50, 0);
- ObjPrim_SetVertexPosition(obj, 3, x+50, y+50, 0);
- ObjSpell_Regist(obj);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment