Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Plural]
- #ScriptVersion[3]
- #Title["Koishi Komeji"]
- #Text["Koishi is acting up again"]
- let objBoss;
- let objScene = GetEnemyBossSceneObjectID();
- @Initialize{
- objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(objBoss);
- ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60); //Move the boss to the specified position
- ObjEnemyBossScene_StartSpell(objScene);
- TDrawLoop; //Call TDrawLoop, which is defined outside of this block.
- //TFinalize;
- //MainTask;
- }
- @Event
- {
- }
- @MainLoop
- {
- yield;
- }
- task TPlural
- {
- let dir = GetCurrentScriptDirectory();
- let obj = ObjEnemyBossScene_Create(); // Make the boss scene object
- // Define Scripts
- ObjEnemyBossScene_Add(obj, 0, dir ~ "non01.txt");
- ObjEnemyBossScene_Add(obj, 0, dir ~ "spell01.txt");
- ObjEnemyBossScene_LoadInThread(obj); // Load
- ObjEnemyBossScene_Regist(obj); // And register
- while(!Obj_IsDeleted(obj)){yield}; // yield while the Boss is not deleted
- CloseScript(GetOwnScriptID()); // Close if it the boss died
- }
- task TDrawLoop {
- let imgKoishi = GetCurrentScriptDirectory() ~ "Sprites\koishi.png";
- ObjPrim_SetTexture(objBoss, imgKoishi);
- ObjSprite2D_SetSourceRect(objBoss, 64, 1, 127, 64);
- ObjSprite2D_SetDestCenter(objBoss);
- }function GetCenterX(){
- return GetStgFrameWidth() / 2;
- }
- function GetCenterY(){
- return GetStgFrameHeight() / 2;
- }
Advertisement
Add Comment
Please, Sign In to add comment