Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["Tutorial 01"]
- #Text["First attempt"]
- //{-----------------------------------------------Boss
- #include "script/default_system/Default_ShotConst.txt"
- let bossObj; //= ObjEnemy_Create(OBJ_ENEMY_BOSS);
- let imgboss = GetCurrentScriptDirectory~"Nel.png";
- let GetX = 0;
- let GetY = 0;
- @Initialize{
- bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(bossObj);
- ObjPrim_SetTexture(bossObj,imgboss);
- ObjSprite2D_SetSourceRect(bossObj,0,0,64,64);
- ObjSprite2D_SetDestCenter(bossObj);
- ObjMove_SetDestAtSpeed(bossObj,192,120,5);
- TMain;
- }
- @Event{
- alternative(GetEventType())
- case(EV_REQUEST_LIFE){
- SetScriptResult(1500);}
- case(EV_REQUEST_TIMER){
- SetScriptResult(45);}
- }
- @Mainloop{
- let GetX = ObjMove_GetX(bossObj);
- let GetY = ObjMove_GetY(bossObj);
- yield;
- }
- @Finalize{
- }
- //}
- //{-----------------------------------------------Tasks
- task TMain{
- wait(60);
- yield;
- fire;
- }
- task fire{
- loop{
- CreateShotA1(GetX,GetY,3,GetAngleToPlayer(bossObj),34,10);
- wait(20);
- }}
- //}
- //{-----------------------------------------------Functions
- task wait(w){
- loop(w){yield}
- }
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement