Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 207602 times)

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #480 on: October 21, 2010, 07:13:56 PM »
is that because I try to draw 3D stuff in Single scripts? I've already used SetScore in @Initialize so that I can use @BackGround.

SetViewTo and other 3D drawing functions can only be used in Stage scripts. I think you might wanna put your code in a stage script so it would work.

Chau

  • Warning! Incoming Engrish post!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #481 on: October 21, 2010, 07:47:05 PM »
Quote
Is that a stage script you are trying to make?

I'm trying to make an enemy script. Looks like I'll have to implement the drawing into the stage script   :ohdear:

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #482 on: October 22, 2010, 03:12:57 AM »
Fucking what?
Don't effect objects allow texture changing or whatever?

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #483 on: October 22, 2010, 03:19:36 AM »
There's a problem right now in that you aren't giving a texture, and then calling UVs on a nonexistent texture.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #484 on: October 22, 2010, 06:01:09 PM »
Does that mean I have to change the initial texture to a transparent pixel?

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #485 on: October 22, 2010, 06:03:23 PM »
You need to re-set the SetVertexUV's after you change the texture, I believe.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #486 on: October 23, 2010, 12:07:25 AM »
It turns out I had to put a loop(2){yield;} before TsuchiEvent; was called.
What the hell, Danmakufu?

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem thread number 4
« Reply #487 on: October 23, 2010, 07:15:02 AM »
It turns out I had to put a loop(2){yield;} before TsuchiEvent; was called.
What the hell, Danmakufu?


This is why I'm making my own game engine for this kind of work.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #488 on: October 23, 2010, 05:25:25 PM »
Hmm I have a question, how do you make things appear off screen, something like Koishi's hell  :V
Hey There !

Paper Conan

  • Productivity, all day 'erry day
  • NOPE, just kidding~
Re: Danmakufu Q&A/Problem thread number 4
« Reply #489 on: October 23, 2010, 05:32:43 PM »
Maybe you can spawn them offscreen but also put a SetShotKillTime.... I'm still learning how to use danmakufu so please don't hurt me  :ohdear:

Re: Danmakufu Q&A/Problem thread number 4
« Reply #490 on: October 23, 2010, 06:35:03 PM »
Hmm I have a question, how do you make things appear off screen, something like Koishi's hell  :V
If you by "off screen" you mean outside the "game area," the first thing that comes into my mind is using effect objects. I'm just a newbie to this kind of stuff though.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #491 on: October 23, 2010, 06:52:52 PM »
Do you mean spawning a bullet off-screen which then moves inward (becoming visible once it's in the game area), or do you mean creating a graphic over the "frame" where your score, lives, etc. are stored, rather than the screen?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #492 on: October 23, 2010, 07:16:02 PM »
where your score, lives, etc. are stored, rather than the screen?

Yah hmmm
Hey There !

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #493 on: October 23, 2010, 07:19:04 PM »
Make an effect object, and put it on layer 8. If you don't know how to do either of those, check here or here, respectively.

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #494 on: October 24, 2010, 01:47:08 AM »
hey guys, I got two (minor...or maybe major...ok medium) problems at the same time and I really hope you can give my some advice for solving these.
First you need two know, that I got several familiars in my Spellcard.
Now the two problems:
1. You prbably know player scripts that automatically hit the boss in the script with some kind of lower level shot when you shoot (like ReimuA). Is there a way to fix that, so that the automatic shots go to the nearest enemy, so that the familiars get shot too? Do I have to change things in the player script to make it hapen or in the single script of my spellcard?(I ask that, 'cause I wanted to use the implemented ReimuA...)

2.I wanted to have an enemy marker on the bottom for the boss and every familiar. I tried to put SetEnemyMarker(true); in @Initialize of my familiars, but I still only have one  for the boss.
Is there a way to get multiple of these?

And a final question for both problems:
Do I have to create my own functions for this or is there some easy way around?(I'm actually pretty sure that I have to make it myself, so I already started to look at that ReimuA player script, but I'm not very familiar(lol) with player scripts, yet...)


€dit:
Wow, another problem and I think I have to tell you by know:
The boss and the familiars look EXACTLY the same!
It's like Flandre making copies of herself, you know.
But Danmakufu ruins everyhting, because the actual boss has these white squares floating around his midpoint.
Is there a way to prevent these from appearing?(They actually anoy me for quite a long time already...)
« Last Edit: October 24, 2010, 02:45:54 AM by Grumskiz »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #495 on: October 24, 2010, 11:24:59 AM »
@ 1) Danmakufu ReimuA is "hardcoded" in the old version. You will need to make your own Reimu for this.

@ 2)  Marker is boss only function. You need to use Effect Objects on Layer 8 at the bottom of the screen. Manually create your own function that spawns a marker for each familiar.

@ your Edit) Think in the System.png you could blanc out the spinning ugly things and then put it in your Danmakufu root/img folder. Check this thread for more info.

Didn't quite get your final question =|

Re: Danmakufu Q&A/Problem thread number 4
« Reply #496 on: October 24, 2010, 11:56:20 AM »
@Grumskiz
To "erase" the white squares, put "MagicCircle(false);" somewhere inside your @initialize.
(Note: This also removes the "magic circle," that round thing that gets smaller and smaller as the timer counts down.)
« Last Edit: October 24, 2010, 12:55:03 PM by Luna »

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #497 on: October 24, 2010, 02:00:27 PM »
Thanks a lot Helepolis and Luna!
I got an alternative ReimuA and ReimuB here made by some japanese guy with nicer graphics and smoother bombs and so on, so I think I will probably use these as base for my new one...
The Enemymarker-thing is not sooo necessary yet, but I would really like to make that later for my script, because it just looks better.(Maybe I also make a playr marker....mhhh)
I think it is better to deactivate that magic circle in the script instead of deleting it from th_dnh.dat, because it is easier to transfer the script.
@Helepolis
Forget about the final question, you answered it already, eventhough you didn't get it^^

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #498 on: November 07, 2010, 02:03:33 AM »
Sorry if this has already been posted, if so, please direct me to that post.
Anyways, does any one know how to make a continuous laser. Kind of like non-directional laser from IN. Thanks!
Oh... I got yin yang-ed.

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #499 on: November 07, 2010, 02:08:57 AM »
Use Object Lasers

and next time... please post in the Q&A thread :D
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #500 on: November 07, 2010, 02:12:31 AM »
Sorry, didn't see it.
Oh... I got yin yang-ed.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #501 on: November 11, 2010, 06:20:38 PM »
How would I get bullets to never spawn on top of the player?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #502 on: November 11, 2010, 06:43:53 PM »
How would I get bullets to never spawn on top of the player?
Code: [Select]
function Checkbullet(rcheck, _regular_bullet_parameters_){
   if(  ((x-GetPlayerX)^2 + (y-GetPlayerY)^2 )^0.5 > rcheck){
        _bullet_spawning_code_;
   }
}
If you want to have bullet delay smoke before, you need this instead:

Code: [Select]
task Checkbullet(rcheck, _regular_bullet_parameters_, delay){

   CreateShotA(1, x, y, delay);
   SetShotDataA(1, 0, 0, angle, 0, 0, 0, graphic);
   SetShotKillTime(1, 0);

   loop(delay){ yield; }

   if(  ((x-GetPlayerX)^2 + (y-GetPlayerY)^2 )^0.5 > rcheck){
        _bullet_spawning_code_without_the_bullet_delay;
   }
}
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Sejha

  • I think Im a game dev. And Musician.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #503 on: November 11, 2010, 11:59:55 PM »
Okay, say I want DNH to automatically load my script, upon launching, could I do that?

Also, can I package my music in a .dat but still call each separate file in the code? If so, how would I go about doing that?
I've evolved a lot. When did I make this account again?

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #504 on: November 12, 2010, 12:41:28 AM »
Okay, say I want DNH to automatically load my script, upon launching, could I do that?
no.

you could decompile the th_dnh.dat and fuck around with stage0.txt (this code executes when running a plural or single file) but i doubt you'd get far.
Also, can I package my music in a .dat but still call each separate file in the code? If so, how would I go about doing that?
dat packing is very glitchy. Tried it and gives you a tonne of weird problems, so i'm not sure on this part.


Edit: Now for my question: What the fuck makes a good stage. I can't make a decent one without spaming rand() or GetAngleToPlayer
is there something I could reference or learn from?
« Last Edit: November 12, 2010, 02:58:04 AM by GTF »

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #505 on: November 12, 2010, 07:02:05 AM »
Edit: Now for my question: What the fuck makes a good stage. I can't make a decent one without spaming rand() or GetAngleToPlayer
is there something I could reference or learn from?
See one post from PoSR thread, brb getting link
« Last Edit: November 12, 2010, 07:10:35 AM by Mewkyuu »

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #506 on: November 12, 2010, 07:12:56 AM »
Yeah, I was trying to find that earlier. Why the fuck isn't it in the info thread yet.

*cough cough*

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #507 on: November 12, 2010, 07:17:26 PM »


you could decompile the th_dnh.dat and fuck around with stage0.txt (this code executes when running a plural or single file) but i doubt you'd get far.dat packing is very glitchy. Tried it and gives you a tonne of weird problems, so i'm not sure on this part.

/sign
I tried both things several times this summer and I completely ruined Danmakufu and it didn't work properly.
I think the only thing you can change in th_dnh.dat without encountering many problems are graphics.(even sounds make problems, depending on the length of what you put in)
You probably know this already, but if you really want to give it a try, this programm is helpful:
http://www.shrinemaiden.org/forum/index.php/topic,4731.0.html

Btw, if you get it to work PLEASE tell us how you did it! It would be a really great opportunity for people who want to create their very own game (with their own menu and stuff)

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #508 on: November 12, 2010, 07:21:09 PM »
Even if you did make it automatically launch, what about the pause menu? And the "return to menu" key? And what about when the script ends, or you get an error, or want to save a replay?
Really, it's not going to be possible. Just pack everything into a single zip/rar file, including Danmakufu, then include a readme saying "run th_dnh.exe and mash Z until you get to a menu screen that's not blue." Most people should be able to understand it.

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #509 on: November 12, 2010, 07:30:47 PM »
Even if you did make it automatically launch, what about the pause menu? And the "return to menu" key? And what about when the script ends, or you get an error, or want to save a replay?
Really, it's not going to be possible. Just pack everything into a single zip/rar file, including Danmakufu, then include a readme saying "run th_dnh.exe and mash Z until you get to a menu screen that's not blue." Most people should be able to understand it.
Well, that's true. Let's just say, that it is probably possible, but not really needed and a LOT of work ;3