Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Player]
- #Menu[N Harmonia Type A (Reshiram)]
- #Text[Let's burn down evil feelings]
- #Replay[HarmoniaA]
- #Image[.\HarmoniaASelect.png]
- #ScriptVersion[2]
- script_player_main{
- let CSD = GetCurrentScriptDirectory;
- let Ntex = CSD ~ "NAPlayer.png";
- let f = 0;
- let f2 = 0;
- let count = -1;
- @Initialize{
- LoadGraphic(Ntex);
- SetPlayerLifeImage(Ntex,0,0,64,64);
- SetSpeed(3,1);
- LoadPlayerShotData(CSD ~ "NAShot.txt");
- }
- @DrawLoop{
- SetTexture(Ntex);
- SetAlpha(255);
- SetGraphicScale(1,1);
- DrawGraphic(GetPlayerX,GetPlayerY);
- }
- @Missed{
- yield;
- }
- @SpellCard{
- }
- @Finalize{
- }
- @MainLoop {
- if((GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) && count == -1){
- count = 0;
- }
- if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD) {
- if(count == 5){
- PlaySE(CSD ~ "fireshot.wav");
- NAShot(GetPlayerX,GetPlayerY-20,20,270,1,3);
- NAShot(GetPlayerX,GetPlayerY-20,20,275,1,4);
- NAShot(GetPlayerX,GetPlayerY-20,20,280,1,5);
- NAShot(GetPlayerX,GetPlayerY-20,20,260,1,4);
- NAShot(GetPlayerX,GetPlayerY-20,20,265,1,3);
- count = -1;
- }
- }
- else {
- if(count == 5){
- PlaySE(CSD ~ "fireshot.wav");
- NAShot(GetPlayerX,GetPlayerY-20,20,270,1,4);
- NAShot(GetPlayerX,GetPlayerY-20,20,260,1,5);
- NAShot(GetPlayerX,GetPlayerY-20,20,280,1,4);
- count = -1;
- }
- }
- if(count >=0) {
- count++;
- }
- SetIntersectionCircle(GetPlayerX,GetPlayerY,1);
- yield;
- }
- task NAShot(x,y,speed,dir,graphic,dmg) {
- let obj = Obj_Create(OBJ_SHOT);
- Obj_SetPosition(obj,x,y);
- Obj_SetSpeed(obj,speed);
- Obj_SetAngle(obj,dir);
- Obj_SetAlpha(obj,155);
- ObjShot_SetGraphic(obj,graphic);
- ObjShot_SetDamage(obj,dmg);
- ObjShot_SetPenetration(obj,1);
- }
- function wait(w) { loop(w) { yield; } }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement