Author Topic: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m [Closed, read last post!]  (Read 172297 times)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #240 on: August 18, 2013, 02:43:38 PM »
I have misunderstood your question I see. I thought you really meant the glowing laser base for the lasers. Though you didn't mention you were using Sinuate Lasers, which confused me for a moment. Unfortunately I don't know the answer to that as I never used sinuating lasers before. =/ My apologies.


Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #241 on: August 18, 2013, 02:48:33 PM »
It happens on all types of lasers, but thanks for trying.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #242 on: August 18, 2013, 03:47:59 PM »
I am not quite sure it is possible what you are looking for. Afaik the lasers are always drawn in Additive rendering, regardless of what you're trying. There isn't a function to change the render state of shots and lasers as they are defined inside the bullet sheets and lasers seem to ignore this. If you're trying the ObjEffect, that is meant for effect objects themselves.

I've booted up my shottester script and fiddled around with the render state, doesn't matter what I do: Lasers are spawned with their glow, though I don't see the glow effect disappearing when I pause, they are as bright ever. You should remember that the pause screen lays over a transparent sheet of black/grey making everything look less glowy. I even booted up my Amakasu non-card where I intensively use lasers but they don't really look different either when I pause.

Or I am horribly wrong and missing something somewhere. . .

Edit
Just realised something. Most likely, you need to use lasers which don't have a bright centre, as ZUN's lasers all have a brighter centre, I have created a bland looking one and that one looked less glowly to me. Perhaps that is what you're looking for?

Edit2
Now I am just confused. You're most likely the first one asking this question here :V can't remember anybody ever asked about that in the years I have scripted. I stand with the above points until someone else jumps in to check this out.
« Last Edit: August 18, 2013, 04:05:41 PM by Helepolis »

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #243 on: August 18, 2013, 04:04:30 PM »
I'll try it, and see if it'll work.

EDIT: Actually, while the edges still don't look right, making the lasers extremely dark seems to make them easy on the eyes, I remember someone telling me that the lasers were hard to see.

Why Danmakufu ignores the shotsheet blend for lasers is beyond me.
« Last Edit: August 18, 2013, 04:15:35 PM by Infinite Ultima Wave »

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #244 on: August 18, 2013, 05:44:00 PM »
If you are talking about the laser's body, I don't see the problem.
It seems okay to me.

On the note of sinuate lasers.
Why do the heads and tails of the lasers have a block attached to it.
Is it Danmakufu 0.12's own problem or does it also happen in ph3?
Currently a normal player

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #245 on: August 18, 2013, 06:13:06 PM »
On the note of sinuate lasers.
Why do the heads and tails of the lasers have a block attached to it.
Is it Danmakufu 0.12's own problem or does it also happen in ph3?

One of my spellcards uses sinuate lasers, but I never had this issue.
Then again, they are intended to move in a straight line only, and they are object sinuate lasers.

I'm sorry that I'm not able to help, but I never had any of such issues, and I have some more questions to ask :V:

1. How does SetDamageRateEx work? It doesn't work on the (external) familiars that I made. The familiars themselves are damaged, but the bosses life doesn't drop when they are hit,
not even if I set it to something like (100,100,100,100);. Blasting apart 2 or 3 familiars with 20000 life might be a bit hard even with a time limit of 180 seconds.

2. Kinda offtopic, but would people mind if I made a topic asking for feedback? My mind is pretty imaginative in thinking up everything that could go wrong, and I will be tormented by myself at least 1/4 of a year if I even think I might have done something wrong.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #246 on: August 19, 2013, 02:08:54 AM »
1. Did you put it in the familiar's script.
I myself have never used this function, so I don't know what if that doesn't work.
Edit: Or maybe it's because Danmakufu is comfused which are the familiars, and which is the boss.

2. What kind of Feedback is it?
« Last Edit: August 19, 2013, 02:11:01 AM by Lavalake »
Currently a normal player

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #247 on: August 19, 2013, 06:23:34 PM »
1. Did you put it in the familiar's script.
I myself have never used this function, so I don't know what if that doesn't work.
Edit: Or maybe it's because Danmakufu is comfused which are the familiars, and which is the boss.

2. What kind of Feedback is it?

The SetDamageRateEx was put inside the @Initialize of the familiars' script.
Is there any way to make it work properly? Apart from placing the familiars inside the enemy script, because that could give crashes according to the danmakufu wiki.
I included the (unfinished) boss script and a familiar so that if anyone wants to help they can see what I did for themselves.
Boss
Familiar

With feedback I was talking about pretty much anything; criticism etc. Would people mind if I, a newbie at Danmakufu, made a topic to post my script(s)/ask for criticism etc.?
Again, I would keep annoying myself for a long time if I did something wrong, so better safe than sorry.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #248 on: August 19, 2013, 09:29:38 PM »
I don't see anything wrong, maybe I'm missing Something.

For your second question, if it's for personal use, I don't think you can.
Currently a normal player

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #249 on: August 19, 2013, 09:56:04 PM »
With feedback I was talking about pretty much anything; criticism etc. Would people mind if I, a newbie at Danmakufu, made a topic to post my script(s)/ask for criticism etc.?
Again, I would keep annoying myself for a long time if I did something wrong, so better safe than sorry.

I don't see why it would be a problem. Since there are many of feedback and personal script threads. (I posted one myself)

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #250 on: August 20, 2013, 12:13:59 AM »
I misunderstood the second question. If it is your thread of projects and feedback, than yes you can.
For some reason, I thouhgt you already had a thread of scripts and you wanted to create another one for only feedback.
Currently a normal player

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #251 on: August 21, 2013, 09:55:39 AM »
I'm having some issues with #include function. The relevant snippet is below:

Code: [Select]
//#include_function ".\sanGayaFramework.dnh"
let spellName = "Frost 'Bouncing Spears'";
let ImgBoss = "script\img\ExRumia.png";
let timer = 20;

#include_function ".\variables.dnh"
#include_function ".\sanGayaFramework.dnh"
#include_function ".\SanGayaLib.dnh"

#include_function ".\moveFunction.dnh"
#include_function ".\shot_variables.dnh"

What's weird is if I remove the commented line, the code breaks with this error message:

But if I leave the commented line in, it works perfectly fine. I've done a bit of programming before and I know a tiny bit of japanese so my guess is the error message translates to something like: "#include_function could not find the file in @directoryHere."
I'm not sure how a commented line is supposed to affect this and how it changes how danmakufu looks for files.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #252 on: August 21, 2013, 02:04:50 PM »
Try ...variables.dnh if variables.dnh is one directory above the directory the  script is located in.

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #253 on: August 21, 2013, 04:31:57 PM »
So, I saw something about the include function above, and that reminds me that I wanted to ask what exactly it does...
Or more specific, what can be done with it, what to write in a to be included script etc..

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #254 on: August 21, 2013, 04:52:12 PM »
So, I saw something about the include function above, and that reminds me that I wanted to ask what exactly it does...
Or more specific, what can be done with it, what to write in a to be included script etc..
Everything?
If you want functions, tasks or create alot of global variables as well as load images and so on, to be shared between all scripts including the script file.
Most people probably just makes a function library to load in all scripts they need them.
For example, a useful function like the function wait(w). Then you can put it in a function library and include it in all your main scripts instead of having to write the function in every script.
If you make a really large/complicated script, you will often have to create alot of functions/tasks to do work in the main scripts and putting them in a function library makes reading the scripts alot easier.

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #255 on: August 21, 2013, 11:29:11 PM »
Can you explain why it's looking for the file in the root DNH directory? Where is the script you're running and what do your directories look like? Also, does including sanGayaFramework.dnh before variables.dnh but after the other random variable declarations do anything different?

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

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #256 on: August 22, 2013, 01:13:04 AM »
How do you make a boss float?  (like that weird animation in the games)

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #257 on: August 22, 2013, 01:35:18 AM »
Assuming by "float" you mean the hover that bosses like Eirin have. In your main loop.

Code: [Select]
variable++;
yield;

//When the variable = 60 move the boss up 5 pixels.
        if(variable==60){
         SetMovePosition03(GetX, GetY-5, 10, 3);
         }
//When the variable = 80 move the boss down 5 pixels and set the variable back to 40
         if(variable==80){
         SetMovePosition03(GetX, GetY+5, 10, 3);
        variable = 40;
        }

Variable is whatever you want it to be. Make sure you define it at the top before @Initialize. It's tacky but it works. You could task it as well.

EDIT: Make sure when moving the boss, you set "variable" to a value over 80. Why? Because if you move the boss the above function will override the move command.
« Last Edit: August 22, 2013, 01:39:39 AM by Infinite Ultima Wave »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #258 on: August 22, 2013, 01:58:45 AM »
Ok.  Thanks!   :)

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #259 on: August 22, 2013, 06:00:30 AM »
Generally I do

Code: [Select]
let float = 0;
@DrawLoop{
   //set up sprite
   DrawGraphic(x, y + sin(float)*a); //a is amplitude, or max height from center
   float = (float + f) % 360; //f is frequency, or speed of movement
}

It's pretty much the easiest and most-accepted way of doing it. It also doesn't actually move the enemy position, which can otherwise be troublesome.
« Last Edit: August 22, 2013, 06:03:26 AM by Drake »

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

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #260 on: August 22, 2013, 11:13:11 AM »
I'm making a Player Script, and I want to make a bomb like Reimu's Fantasy Seal.

How do I make them?
Easy Modo? That's for kids, and for me.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #261 on: August 22, 2013, 12:04:20 PM »
I'm making a Player Script, and I want to make a bomb like Reimu's Fantasy Seal.

How do I make them?
Perhaps gauging your knowledge. How far are you experienced and known with the following:
- Tasks and functions
- Player scripting
- Effect Objects & Objects

Because those are the ones you roughly need to create your spell card bombs. Did you take a look at Stuffman's Sakuya player tutorial? It pretty much shows you how to implement bombs. If you have the knowledge of the above mentioned then you're good to go.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #262 on: August 25, 2013, 10:10:05 AM »
I'm wondering, how do you connect stage files together ?

like Stage 1 --> Stage 2 --> Stage 3

I tried putting them in the same script, but I can't change the background    :qq:

I heard something  about #include_function butttt hmmm I got nothing.
Hey There !

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #263 on: August 25, 2013, 02:23:56 PM »
I'm wondering, how do you connect stage files together ?

like Stage 1 --> Stage 2 --> Stage 3

I tried putting them in the same script, but I can't change the background    :qq:

I heard something  about #include_function butttt hmmm I got nothing.

This is something that you should not focus on until later.
I'll give an example in a moment.

http://pastebin.com/2Y6GKqMe
First, look at this link. Here we have the Danmakufu header with [Stage]. Inside script_stage_main we then connect to a number of files named "Stage#tasks.txt"
Then at the end of @Initialize, I call a task, PDDEasy (most people name it Stage or Game or something similar). First we yield; (because it's required to yield the first frame of a stage script), then Setup (function located elsewhere), and then call stages Stage1E, etc. These are functions (NOT tasks) inside the included Stage#tasks.txt files.

http://pastebin.com/vEZGLR2B

THis is the content of one of those files. If you include the Danmakufu header in one of the included functions, Danmakufu will give you an error, by the way. So avoid. And if you use tasks instead of functions when calling the stage data (Stage#E), then nothing will work because Danmakufu won't wait for the task to finish executing.

--Backgrounds--
Each person does full game backgrounds differently. I set a variable to control which stage was going on and then used that variable to determine which background to use. It may be more efficient to use CommonData, however.
« Last Edit: August 25, 2013, 02:32:12 PM by Sparen »

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #264 on: August 25, 2013, 04:56:28 PM »
Is it possible to make like ~50 variables at once?
I am trying to make my first 3D background, and I need about fifty random places for background elements to spawn.
I tried using an ascent loop with ToString(); , but that didn't work.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #265 on: August 25, 2013, 05:45:16 PM »
I think you can use arrays. They're pretty much a bunch of variables all stacked together.

Code: [Select]
let Background_Array1 = [10,99,120,900];

@Main Loop
Background_Array1[0]++;  //Increase the first value in the array by 1 every frame.

You can name it whatever you want.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #266 on: August 25, 2013, 11:11:42 PM »
If you have too many elements in an array, it will lag Danmakufu when it tries to access some of those elements. Avoid using longer arrays. And remember; if you have to debug later, it's hard to debug when you have a lot of numbers in an array.

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #267 on: August 26, 2013, 12:03:23 AM »
Is it possible to make like ~50 variables at once?
I am trying to make my first 3D background, and I need about fifty random places for background elements to spawn.
You turn that background element into its own procedure/task/function and call it fifty times instead. You likely don't need to access the objects or variables besides in the context of that process, so just keep each as one instance of a task you call or something. It's much easier to manage, and it's scalable.

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

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #268 on: August 26, 2013, 12:07:05 AM »
How do I make background effects like the falling cherry petals/maple leaves/snowflakes?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #269 on: August 26, 2013, 01:43:18 AM »
How do I make background effects like the falling cherry petals/maple leaves/snowflakes?

*Evil grin*

I took and edited the code from the Last Comer (which had random unnecessary crud everywhere) for PDD. The Last Comer used Object Effects.

Ask Miransu; he's doing it for his CURSE 1 contest entry.