Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 468756 times)

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #270 on: August 22, 2016, 12:36:30 AM »
How would I make everything else wait until the midboss dies?

thanks for the help, by the way

Code: [Select]
StartScript(idScript);
while(!IsCloseScript(idScript)){yield;}

The code after the "while" statement waits for the midboss script to terminate before activating.
Lunatic 1CCs: PCB, IN, PoFV, HSiFS
Extra: All except PC-98.

Oh hey look I can do DNH scrips.

Jimmy

  • Shameless spender
  • gaining big pounds
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #271 on: August 25, 2016, 12:28:56 AM »
I've been wondering about a thing for a while, which I didn't think of earlier.

Is there any way that the rate, at which the spellcard bonus decreases, can be influenced/changed? I'm not referring to the types of spells (e.g. survivals where the bonus doesn't decrease at all), but a place where said decrease of the bonus on normal spells can be changed. Is there one?
Normal 1cc: EoSD, PCB, IN, PoFV, MoF, UFO, TD, DDC, LoLK Legacy, HSiFS, WBaWC
Hard 1cc: IN, DDC, HSiFS
Extra clears: MoF, DDC, HSiFS, WBaWC

Goals: Going Extra Hard!

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #272 on: August 25, 2016, 12:44:09 AM »
I've been wondering about a thing for a while, which I didn't think of earlier.

Is there any way that the rate, at which the spellcard bonus decreases, can be influenced/changed? I'm not referring to the types of spells (e.g. survivals where the bonus doesn't decrease at all), but a place where said decrease of the bonus on normal spells can be changed. Is there one?

Ph3 has a default handling of Spell Card Bonuses and it doesn't seem possible to directly alter. However, it wouldn't be too hard use Obj_Values to set your own bonus and write logic that governs its decay. Then using the EV_GAIN_SPELL flag in @Event, you can simply use AddScore to apply the bonus to the score and play a visual effect that displays the bonus. I think you could probably even just use the default "Spell Card Bonus" text and effect for that too. You'd probably have to disable the default handling of the bonus by altering the System script, but I don't remember if that's exactly true right now.

SusiKette

  • @MainLoop { yield; }
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #273 on: August 28, 2016, 08:03:47 AM »
I kinda wanted to get back to programming Danmakufu after a while : p
Wasn't it possible to make stand alone game in Danmakufu? Like so that you don't have to go through Danmakufu's own menus to select stages etc. and have custom main menu and stuff.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #274 on: August 28, 2016, 08:28:50 AM »
I kinda wanted to get back to programming Danmakufu after a while : p
Wasn't it possible to make stand alone game in Danmakufu? Like so that you don't have to go through Danmakufu's own menus to select stages etc. and have custom main menu and stuff.
Yes. The th_dnh.def file in your root can call to a package file to use it as a "entry point" for your game. Example from my game:
Code: [Select]
package.script.main = script/thdcs/DanceContestMain.txt
DanceContestMain.txt decorates the screen with menu title and such. Of course, you'll need to get comfortable with package scripts for this all. There should be a sample in your default dnh folder for the Rumia called th_dnh.def.sample
« Last Edit: August 28, 2016, 08:35:24 AM by Helepolis »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #275 on: September 01, 2016, 05:13:39 PM »
So apparently, Danmakufu's ToString function insists on turning integers into floats. So telling it to write the number 5 causes it to write 5.000000 instead. Is there any workaround for this, or am I missing something obvious?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #276 on: September 01, 2016, 05:50:51 PM »
It is not the ToString function. Numbers / integers in Danmakufu are both in 0.12m and ph3 tracked as float. If you draw the X / Y position of your boss as text on your screen, you will see it as a float too.

Afaik you can use 'rtos' or 'vtos' to truncate the value and decide the number of digits as decimal. If I can find an example then I will update my post. Or you might already fix it in the mean while.

Edit: I think atoi is what you seek.
Edit2: Nope, misread the function. It isn't atoi. My apologies.
« Last Edit: September 01, 2016, 05:55:10 PM by Helepolis »

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #277 on: September 02, 2016, 04:35:02 AM »
It is not the ToString function. Numbers / integers in Danmakufu are both in 0.12m and ph3 tracked as float. If you draw the X / Y position of your boss as text on your screen, you will see it as a float too.

Afaik you can use 'rtos' or 'vtos' to truncate the value and decide the number of digits as decimal. If I can find an example then I will update my post. Or you might already fix it in the mean while.

Edit: I think atoi is what you seek.
Edit2: Nope, misread the function. It isn't atoi. My apologies.

It's IntToString.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #278 on: September 02, 2016, 03:55:56 PM »
It is not the ToString function. Numbers / integers in Danmakufu are both in 0.12m and ph3 tracked as float. If you draw the X / Y position of your boss as text on your screen, you will see it as a float too.

Afaik you can use 'rtos' or 'vtos' to truncate the value and decide the number of digits as decimal. If I can find an example then I will update my post. Or you might already fix it in the mean while.

Edit: I think atoi is what you seek.
Edit2: Nope, misread the function. It isn't atoi. My apologies.

It's IntToString.

Both rtos and IntToString worked perfectly.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #279 on: September 03, 2016, 06:24:15 PM »
Not really that important for now, but I noticed the function to set the enemy's hitbox only created a circle. My sprite is 68x117 and either the circle is too small or way too big on the sides. Is there any way to make a square instead (i looked in the danmakufu wiki ph3 function list but there was only the one with a circle)?

Also, more importantly, Helepolis' tutorial uses "if" and "else if" to select sprites in the spritesheet. But my spritesheet has only one animation (for idling), and i don't need the part with "else if" but if i remove it it gives me an error. Is there something else i could use instead of "if" and "else if" ?

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #280 on: September 03, 2016, 06:50:03 PM »
Also, more importantly, Helepolis' tutorial uses "if" and "else if" to select sprites in the spritesheet. But my spritesheet has only one animation (for idling), and i don't need the part with "else if" but if i remove it it gives me an error. Is there something else i could use instead of "if" and "else if" ?

For starters, you might want to think about getting a spritesheet with more animations, as a spritesheet with only one animation is generally frowned upon.

But if you only have one sprite, the following should work. (I'm assuming you don't have animations to move, in which case you don't even need an if statement).

Code: [Select]
@MainLoop{
ObjSprite2D_SetSourceRect(the name of your boss variable,insert coordinates here);
ObjSprite2D_SetDestCenter(the name of your boss variable);
}

You could also place those two lines in a task.
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #281 on: September 11, 2016, 04:21:33 PM »
I have several sprites but they're only for idling. Helepolis used a spritesheet with movement animations and other stuff (from an official touhou game), so my problem still isn't solved :/
Also is there anyone i could just chat with who knows some stuff about danmakufu ? Because i probably have tons of newbie questions and i don't really want to spam this topic

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #282 on: September 11, 2016, 05:36:14 PM »
Also is there anyone i could just chat with who knows some stuff about danmakufu ? Because i probably have tons of newbie questions and i don't really want to spam this topic

You could PM me, but I'm not that active on the weekdays  :(

I have several sprites but they're only for idling. Helepolis used a spritesheet with movement animations and other stuff (from an official touhou game), so my problem still isn't solved :/

Something like this should work.

first, make a variable called animframe (or whatever you feel like calling it) and set it to 0.

then, in @MainLoop.

Code: [Select]
@MainLoop{
                if(animFrame < 20) { ObjSprite2D_SetSourceRect(boss,coords); }
if(animFrame >= 20 && animFrame < 40) { ObjSprite2D_SetSourceRect(boss,coords); }
if(animFrame >= 40 && animFrame < 60) { ObjSprite2D_SetSourceRect(boss,coords); }
                if(animFrame > 60) { animFrame = 0;}
               
                animFrame ++;
}
« Last Edit: September 11, 2016, 05:42:13 PM by Lollipop »
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #283 on: September 11, 2016, 05:38:20 PM »
I have several sprites but they're only for idling. Helepolis used a spritesheet with movement animations and other stuff (from an official touhou game), so my problem still isn't solved :/
Also is there anyone i could just chat with who knows some stuff about danmakufu ? Because i probably have tons of newbie questions and i don't really want to spam this topic
Sure, I'll help.
I have school to deal with and I'm somewhat new myself but I've been able to make somewhat decent bosses and players. Good for a newbie, terrible compared to regular standards, like what you'd see in Koishi Heck and Experiment 354.
Try Not My Spellcard with Reimu C and see how it goes. (I'm working on a better dialogue system for my next project, more similar to the classic)
https://www.shrinemaiden.org/forum/index.php/topic,19819.0.html
Anyways, if you're truly new then I should be able to help with anything. Send me a PM from the top navigation bar, expect a reply within a day if I'm not busy.

Pretty much every sprite ever can be found here:
< link removed by Hele >
Just have a look around, download the sheet you need and crop out just the bit you're using. You might need to do some more editing to make it usable, Danmakufu won't handle everything for you.

Also I dug up the link for all the sound effects from all games.
< link removed by Hele >
Not sure who made this, but thanks so much.
Somebody should put this somewhere more visible.

Anyways is there a way to create some sort of save file in Danmakufu?
In the Package (full game) I'm working on I've decided to have the difficulty change depending on how well you're doing, so if you're failing horribly you get easier stages and bosses, if you have a perfect run you get much harder stuff and lots more score. Depending on how well you did you also unlock a certain difficulty Extra stage.
I only need to track the best run.
« Last Edit: September 12, 2016, 08:26:51 PM by Helepolis »

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #284 on: September 11, 2016, 05:44:34 PM »
Pretty much every sprite ever can be found here:
< link removed by Hele >
Just have a look around, download the sheet you need and crop out just the bit you're using. You might need to do some more editing to make it usable, Danmakufu won't handle everything for you.

Also I dug up the link for all the sound effects from all games.
< link removed by Hele >
Not sure who made this, but thanks so much.
Somebody should put this somewhere more visible.

Are those allowed? Didn't ZUN say something about touching original stuff?
« Last Edit: September 12, 2016, 08:27:02 PM by Helepolis »
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #285 on: September 11, 2016, 05:46:24 PM »
Are those allowed? Didn't ZUN say something about touching original stuff?

Technically we are not allowed to use his original resources, but it's done anyways.

However, do note that not everything that ZUN uses is his originally - sound effects and background source images in particular may come from other sources.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #286 on: September 11, 2016, 06:10:34 PM »

first, make a variable called animframe (or whatever you feel like calling it) and set it to 0.


That's actually what Helepolis put on his tutorial and i tried removing the else if part with success (i have no idea what i did the first time but it wasn't working). Right now i'm almost done with my animation (had to redo a spritesheet because i didn't lay the previous one out correctly so i had trouble), i'm just a bit confused about the first 2 numbers of  ObjSprite2D_SetSourceRect (the 0), i looked this function up on the danmakufu wiki but it isn't very accurate and i don't get what to write there. By the way, my spritesheet isn't from touhou but i can share it if anyone wants it .

Code: [Select]
if (speed == 0) {
ObjRender_SetAngleXYZ(bossObj,0,0,0);
if(animFrame < 15) { ObjSprite2D_SetSourceRect(bossObj,0,0,64,117); }
if(animFrame >= 15 && animFrame < 30) { ObjSprite2D_SetSourceRect(bossObj,0,0,128,117); }
if(animFrame >= 30 && animFrame < 45) { ObjSprite2D_SetSourceRect(bossObj,0,0,192,117); }
if(animFrame >= 45) { ObjSprite2D_SetSourceRect(bossObj,0,0,256,117); }
animFrame2 = 0;
« Last Edit: September 11, 2016, 06:19:11 PM by JoJo »

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #287 on: September 11, 2016, 06:21:06 PM »
Right now i'm almost done with my animation (had to redo a spritesheet because i didn't lay the previous one out correctly so i had trouble), i'm just a bit confused about the first 2 numbers of  ObjSprite2D_SetSourceRect (the 0), i looked this function up on the danmakufu wiki but it isn't very accurate and i don't get what to write there.

the first two numbers are x,y coordinates of the top-left of your sprite, and the last two numbers are the x,y coordinates of the bottom-right of your sprite. It essentially draws a rectangle from the top-left of your sprite to the bottom-right.
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #288 on: September 11, 2016, 06:27:40 PM »
Alright
I tinkered a bit with the numbers and the sprites aren't all fucked up like at the beginning, BUT during a movement the boss will lock on a sprite (basically it will pause the animation during the movement and when it stops moving it resumes the animation). If anyone knows how to fix this...

Code: [Select]
if (speed == 0) {
ObjRender_SetAngleXYZ(bossObj,0,0,0);
if(animFrame < 15) { ObjSprite2D_SetSourceRect(bossObj,0,0,64,117); }
if(animFrame >= 15 && animFrame < 30) { ObjSprite2D_SetSourceRect(bossObj,64,0,128,117); }
if(animFrame >= 30 && animFrame < 45) { ObjSprite2D_SetSourceRect(bossObj,128,0,192,117); }
if(animFrame >= 45) { ObjSprite2D_SetSourceRect(bossObj,192,0,256,117); }
animFrame2 = 0;
}
animFrame++; // count animFrame. (++ is +1)
animFrame2+=2; // count animFrame2.
if(animFrame > 60) { animFrame = 0; } // reset animFrame when it is higher than 60.
yield;

By the way, thanks a lot to everyone because i would have given up since long if it weren't for your help.
« Last Edit: September 11, 2016, 07:38:44 PM by JoJo »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #289 on: September 11, 2016, 06:40:39 PM »
Technically we are not allowed to use his original resources, but it's done anyways.

However, do note that not everything that ZUN uses is his originally - sound effects and background source images in particular may come from other sources.

That doesn't change anything. Outside of the things he made himself, ZUN uses stuff he paid for pretty much exclusively.
Using any number of his assets is potentially violating the rights of multiple people. It's no better than pirating paid royalty-free content directly.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #290 on: September 12, 2016, 08:29:23 PM »
For that reason I've removed the links containing those sources.


@ Jojo,  this shows only the 0-speed code though. Could you post the entire animation code you have in pastebin?

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #291 on: September 12, 2016, 08:44:22 PM »
Alright, I understand. Sorry about the misunderstanding.

Going to ask again, is there a way to create some kind of save file?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #292 on: September 13, 2016, 06:41:48 AM »
Yes you can. You could use the commondata to keep track of all parameters and write them to the commondata file.

Take a look at http://dmf.shrinemaiden.org/wiki/Common_Data_Functions


Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #293 on: September 13, 2016, 11:19:07 PM »
(I'm assuming this is the right place for this)

So I'm confused about something. I see things about the All-Star Shotsheet by Ozzy basically all over the place. I see it mentioned a lot, and used in lots of scripts, even recent ones (like, from the past couple of weeks). It certainly seems like a very good shotsheet, judging by what I've found looking through scripts' files.
But... I can't seem to actually find it anywhere.
I've certainly tried to find it. I've done searches on Google, on BulletForge, and on MotK, but I've found nothing at all; the closest I've found is the ZUN Expanded Shotsheet by Ozzy which, while also good, doesn't give quite as much variety, and seems to just be rips of ZUN's data. I know I can just take it from other scripts, but I dunno, for some reason something about that just feels wrong, like I'm using something I'm not supposed to.
Does anybody know if there's a reason for this? Or am I just being stupid somehow? (And if I am, you're welcome to slap me.)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #294 on: September 14, 2016, 12:37:28 PM »
(I'm assuming this is the right place for this)

So I'm confused about something. I see things about the All-Star Shotsheet by Ozzy basically all over the place. I see it mentioned a lot, and used in lots of scripts, even recent ones (like, from the past couple of weeks). It certainly seems like a very good shotsheet, judging by what I've found looking through scripts' files.
But... I can't seem to actually find it anywhere.
I've certainly tried to find it. I've done searches on Google, on BulletForge, and on MotK, but I've found nothing at all; the closest I've found is the ZUN Expanded Shotsheet by Ozzy which, while also good, doesn't give quite as much variety, and seems to just be rips of ZUN's data. I know I can just take it from other scripts, but I dunno, for some reason something about that just feels wrong, like I'm using something I'm not supposed to.
Does anybody know if there's a reason for this? Or am I just being stupid somehow? (And if I am, you're welcome to slap me.)

The All Star Shotsheet was made by Ozzy/ExPorygon for a now-defunct project to create a Touhou All Stars (similar to Yuke's unreleased one). He made the shot sheet, the image containing the shots was made by gore (who must be cited).

Naturally, there is not official download link to the shot sheet, because it was simply located in the collaborators folder, which was open to members of LOCAA who were working on the project. It's just that the majority of us decided that the ZUN Expanded Shotsheet was inferior and switched to the All Star Shotsheet.

Beyond this, many newer scripters have gained access to it by copying it from other scripts that use it. However, if you use it, both ExPorygon/Ozzy and gore MUST be cited, and do be aware that there are some errors in the shot sheet as well.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #295 on: September 14, 2016, 02:21:23 PM »
Mine
Code: [Select]
while(!Obj_IsDeleted(bossObj)) {

// update boss speed/dir locally
dir = ObjMove_GetAngle(bossObj);
speed = ObjMove_GetSpeed(bossObj);

// animation handling
if (speed == 0) {
ObjRender_SetAngleXYZ(bossObj,0,0,0);
if(animFrame < 15) { ObjSprite2D_SetSourceRect(bossObj,0,0,64,117); }
if(animFrame >= 15 && animFrame < 30) { ObjSprite2D_SetSourceRect(bossObj,64,0,128,117); }
if(animFrame >= 30 && animFrame < 45) { ObjSprite2D_SetSourceRect(bossObj,128,0,192,117); }
if(animFrame >= 45) { ObjSprite2D_SetSourceRect(bossObj,192,0,256,117); }
animFrame2 = 0;
}
animFrame++; // count animFrame. (++ is +1)
animFrame2+=2; // count animFrame2.
if(animFrame > 60) { animFrame = 0; } // reset animFrame when it is higher than 60.
yield;
}
}

The original
   
Code: [Select]
while(!Obj_IsDeleted(bossObj)) {

// update boss speed/dir locally
dir = ObjMove_GetAngle(bossObj);
speed = ObjMove_GetSpeed(bossObj);

// animation handling
if(speed == 0){
ObjRender_SetAngleXYZ(bossObj,0,0,0);
if(animFrame < 15) { ObjSprite2D_SetSourceRect(bossObj,0,0,64,64); }
if(animFrame >= 15 && animFrame < 30) { ObjSprite2D_SetSourceRect(bossObj,64,0,128,64); }
if(animFrame >= 30 && animFrame < 45) { ObjSprite2D_SetSourceRect(bossObj,128,0,192,64); }
if(animFrame >= 45) { ObjSprite2D_SetSourceRect(bossObj,192,0,256,64); }
animFrame2 = 0;
}
else if(cos(dir) < 0){
ObjRender_SetAngleXYZ(bossObj,0,180,0); // flip vertical
if(animFrame2 < 15) { ObjSprite2D_SetSourceRect(bossObj,0,64,64,128); }
if(animFrame2 >= 15 && animFrame2 < 30) { ObjSprite2D_SetSourceRect(bossObj,64,64,128,128); }
if(animFrame2 >= 30 && animFrame2 < 45) { ObjSprite2D_SetSourceRect(bossObj,128,64,192,128); }
if(animFrame2 >= 45) { ObjSprite2D_SetSourceRect(bossObj,192,64,256,128); }
}
else if(cos(dir) > 0){
ObjRender_SetAngleXYZ(bossObj,0,180,0); // flip vertical
if(animFrame2 < 15) { ObjSprite2D_SetSourceRect(bossObj,0,128,64,192); }
if(animFrame2 >= 15 && animFrame2 < 30) { ObjSprite2D_SetSourceRect(bossObj,64,128,128,192); }
if(animFrame2 >= 30 && animFrame2 < 45) { ObjSprite2D_SetSourceRect(bossObj,128,128,192,192); }
if(animFrame2 >= 45) { ObjSprite2D_SetSourceRect(bossObj,192,128,256,192); } 
}
animFrame++; // count animFrame. (++ is +1)
animFrame2+=2; // count animFrame2.
if(animFrame > 60) { animFrame = 0; } // reset animFrame when it is higher than 60.
yield;
}
}

Basically based off your tutorial with a part removed (because i only have an idling animation) and with the right numbers.
(By the way sorry for not using spoilers but i'm new to this site and haven't found how to use spoilers :/ )

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #296 on: September 14, 2016, 04:44:19 PM »
Our forum doesn't have the unfolding spoiler button thing to hide/show things. Instead for large piece of code we use  http://pastebin.com/ and post the link here. It is also easier to maintain.

About your code: I can see what is confusing you. First, realise that when your boss is moving, the if(speed == 0) {} part is never executed. Why? Because speed is no longer 0. It is another number, but 0. So your script will skip over this block of code, because the statement resolves in 'false'.

This is why your sprite "locks" onto a specific animation. The game doesn't know what statement/animation to show if the boss is having speed higher or lower than zero. So it will freeze a sprite or the sprite it was showing. When the boss stops moving and has exactly 0 speed, the statement will be run and thus animation will occur.

So in your case, you need to delete the following piece of code:
- if (speed == 0) {  line
- the closing curly brace } for that block.

That will fix your problem. To clean up your code, you can remove:
- animFrame2+=2; as this is no longer used.
- dir = ObjMove_GetAngle(bossObj);  also no longer used.
- speed = ObjMove_GetSpeed(bossObj);   also no longer used.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #297 on: September 14, 2016, 08:40:24 PM »
The All Star Shotsheet was made by Ozzy/ExPorygon for a now-defunct project to create a Touhou All Stars (similar to Yuke's unreleased one). He made the shot sheet, the image containing the shots was made by gore (who must be cited).

Naturally, there is not official download link to the shot sheet, because it was simply located in the collaborators folder, which was open to members of LOCAA who were working on the project. It's just that the majority of us decided that the ZUN Expanded Shotsheet was inferior and switched to the All Star Shotsheet.

Beyond this, many newer scripters have gained access to it by copying it from other scripts that use it. However, if you use it, both ExPorygon/Ozzy and gore MUST be cited, and do be aware that there are some errors in the shot sheet as well.
Alright, that'd explain it, thanks. (And I didn't know I have to credit gore as well; I'll keep that in mind.)
I actually have taken it from another script and played with it a bit, and yeah, I did notice the errors in it, which I think I've fixed for the most part.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #298 on: September 15, 2016, 08:29:20 PM »
Thanks a looooooot ! Everything's working now !
Well, almost :

http://puu.sh/rcqmz/7cd6efe508.jpg
As you can see here there's a weird line of blue pixels on the top left corner of the sprite (of course unrelated to the background since it moves along with the sprite). I can assure you that the spritesheet does not have it. I also had this problem when i was using a single sprite. Do you know what could have caused it ? (it's not that important anyway)

Also, is it possible to disable the ugly EoSD circle thing ?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #299 on: September 16, 2016, 12:01:34 AM »
Thanks a looooooot ! Everything's working now !
Well, almost :

http://puu.sh/rcqmz/7cd6efe508.jpg
As you can see here there's a weird line of blue pixels on the top left corner of the sprite (of course unrelated to the background since it moves along with the sprite). I can assure you that the spritesheet does not have it. I also had this problem when i was using a single sprite. Do you know what could have caused it ? (it's not that important anyway)

Also, is it possible to disable the ugly EoSD circle thing ?

Blue pixels: add 1 to the top coordinate of your sprites (it has to do with the way things are rendered in DNH)
Disable circle: For a local solution, ensure that your script's System file does not have the magic circle enabled. This assumes that you have a separate copy of default_system within your script folder that is used specifically for the script.