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

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #960 on: January 19, 2018, 01:48:36 AM »
If a creator decides to package their files so that they cannot be accessed by other people, please respect their decision to protect their assets.

If you want to rip their resources with complete disregard to their wishes, feel free to use Google search or the forum's search feature.

 :blush: :blush: You said in such a disappointed way... I feel embaresed now :blush: :blush:
And I can't even delete this
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #961 on: January 19, 2018, 03:12:23 AM »
It's fine, we just need to tell people to make it known that it's frowned upon and so that people aren't unintentionally being disrespectful.

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

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #962 on: January 19, 2018, 12:32:20 PM »
How can I recreate Reisen's effect/illusion?
("one" bullet turns to two in differents angles - First Spell)
« Last Edit: January 20, 2018, 11:54:20 AM by jao »
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #963 on: January 19, 2018, 09:41:15 PM »
Hello. I'm trying to make a spell that releases Bills which explode into bullets. The bullets are large balls with 10 tiny balls which circle around each.

Code: [Select]
task MainTask {
Wait(60); //Time for the Boss to get in position
while(ObjEnemy_GetInfo(objBoss,INFO_LIFE) > 0){
let bomb = CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 0, 90, DS_BILL_BLUE, 5); //Creates "Bombs"
ObjMove_SetDestAtFrame(bomb, GetPlayerX(), GetPlayerY(), 60); //Moves the "Bomb" to the Player's previous position
Wait(60); //Wait until the bomb gets in position
let thetaT = rand(0,36);
ascent(i in 0..10){
let bull = CreateShotA1(ObjMove_GetX(bomb), ObjMove_GetY(bomb), 4, thetaT+36*i, DS_BALL_M_A_SKY, 5); //Creates the "shrapnel"
ObjMove_SetAngularVelocity(bull, 0.45);
ascent(j in 0..10){
let orb = CreateShotA1(ObjMove_GetX(bull)+20*cos(36*i), ObjMove_GetY(bull)+20*sin(36*i), 0,36*j, DS_BALL_SS_SKY, 5); //Creates bullets that circle around the shrapnel
Orbit(bull,orb,36*j);
}
}
Obj_Delete(bomb); //Deletes the bomb
Wait(7);
}
}

task Orbit(bull,orb,ang) {
let tim = 0;
while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
ObjMove_SetPosition(orb,ObjMove_GetX(bull)+4.3*cos(ObjMove_GetAngle(bull))+20*cos(ang+tim), ObjMove_GetY(bull)+4.3*sin(ObjMove_GetAngle(bull))+20*sin(ang+tim)); //Keeps the bullets around the shrapnel
tim += 3; //Causes the bullets to rotate around the shrapnel
yield;
}
}
The problem I'm having is that tiny bullets keep appearing in the top-left corner. I think it's the SetPosition command in the Orbit task that's causing this, but I don't know how to fix it.

PS: I am VERY new to Danmakufu.

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #964 on: January 20, 2018, 11:59:06 AM »
I wanted to make an overlay that moves/scroll above the spell bg...
How I do that?
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #965 on: January 20, 2018, 03:31:17 PM »
I wanted to make an overlay that moves/scroll above the spell bg...
How I do that?

Make an Overlay, and then move it across the spell bg using ObjRender_SetPosition()?

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #966 on: January 20, 2018, 05:47:00 PM »
How can I recreate Reisen's effect/illusion?
("one" bullet turns to two in differents angles - First Spell)

Copying bullets isn't too hard when you know exactly what kind of bullets you'll be copying - just make another with the same parameters and no delay on top of the original shot. A generalized version is harder, since there aren't getters for a lot of things (like acceleration, angular velocity...), so you'd need to either pass the inaccessible properties in as parameters, or store them in the shot's dictionary when you set them (i.e. Obj_SetValue(shot,"Acceleration",0.05); ).

As for the other part (the shots turning transparent/non-colliding), what you'll want is a task that sets the shot's alpha (ObjRender_SetAlpha) and makes it non-colliding (ObjShot_SetIntersectionEnable), moves it how you want, and then sets its alpha and collision back how they were. To preserve its motion after releasing it and prevent it turning to face the direction you're moving it in, set its position and angle each frame instead of using speed/angle.

If the shot has acceleration, you'll also want to note its speed at the beginning and set it back to that at the end, so that it doesn't accelerate while being moved. You might also need to set its speed to zero while moving it, not sure if that'll cause problems.

As for moving it from a to b by setting its position, here are some functions to simplify the matter:
Code: [Select]
function lerp(start,end,t){return (1-t)*start+t*end;}
function blerp(x0,y0,x1,y1,t){return [lerp(x0,x1,t),lerp(y0,y1,t)];}
These are functions for [bi]linear interpolation, which just means "get a point xx% of the way along this line". The first is for a single value (such as x, y, or angle); the second finds a point in 2D coordinates. t is a ratio (0-1) of how far along to get the point from.

A few more helpful functions:
Code: [Select]
//Ultima
function NormalizeAngle(angle){ angle %= 360; if(angle<0){angle += 360;} return angle; }
//Blargel
function GetAngularDistance(angle1, angle2){ let distance = NormalizeAngle(angle2 - angle1); if(distance>180){ distance-=360; } return distance; }
These help avoid things behaving weirdly when, say, one angle is 15 degrees and the other is 330 degrees. If you just subtract the angles normally it'll probably end up going all the way around - this way you can easily determine the shorter way to turn.

So the code to move the shot would look something like this:
Code: [Select]
task MoveShot(shot,startx,starty,endx,endy,startang,endang,time){
    ObjRender_SetAlpha(shot,128); ObjShot_SetIntersectionEnable(shot,false); let origspd = ObjMove_GetSpeed(shot);
    let dA = GetAngularDistance(startang,endang);
    let pos; let ang;
    ascent(i in 0..time){
        pos = blerp(startx,starty,endx,endy,  i/time);
        ang = startang + lerp(0,dA, i/time);
        ObjMove_SetPosition(shot, pos[0],pos[1]);
        ObjMove_SetAngle(shot,ang);
        yield;
    }
    ObjRender_SetAlpha(shot,255); ObjShot_SetIntersectionEnable(shot,true); ObjMove_SetSpeed(shot,origspd);
}
You'd call that on both the original shot and the copied shot, adjusting their parameters as desired.
Literally everything in this script will crash and burn.
1CC tracker

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #967 on: January 20, 2018, 06:03:54 PM »
Code: [Select]
while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
ObjMove_SetPosition(orb,ObjMove_GetX(bull)+etc, ObjMove_GetY(bull)+etc);
yield;
}
The problem here is that you aren't checking if the central bullet has been deleted. The central shot gets deleted, the task keeps going, and it continues setting the orbiting shots' position. Since the central shot is deleted, trying to get its position gives 0,0, and so that's where they rotate around. Rather than while(ObjEnemy_GetInfo(objBoss,INFO_LIFE)>0){...}, use while(!Obj_IsDeleted(bull)){...}.

Everything created by the single gets deleted at the end anyway (assuming you set SetAutoDeleteObject(true);, which you should), so no need to keep checking the boss' life everywhere. Even for stuff that doesn't depend on a central bullet/etc, I just check the boss' life once per frame in @MainLoop and use while(!Obj_IsDeleted(boss)){...} elsewhere.


Ah, right, I originally came here to ask a question of my own.
I've got (among other things) a 2D sprite that goes on top of another 2D sprite, and a task setting its position to the position of the first one. When I move the first one around, though, the second lags behind by a frame, presumably due to the order things are being executed in each frame. Any way I can synchronize them aside from moving both of them every time?
« Last Edit: January 20, 2018, 06:11:37 PM by Andi »
Literally everything in this script will crash and burn.
1CC tracker

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #968 on: January 20, 2018, 09:04:48 PM »
Make an Overlay, and then move it across the spell bg using ObjRender_SetPosition()?
Don't worry, I got it working with "your" help (your github site)

So the code to move the shot would look something like this:
Code: [Select]
task MoveShot(shot,startx,starty,endx,endy,startang,endang,time){
    ObjRender_SetAlpha(shot,128); ObjShot_SetIntersectionEnable(shot,false); let origspd = ObjMove_GetSpeed(shot);
    let dA = GetAngularDistance(startang,endang);
    let pos; let ang;
    ascent(i in 0..time){
        pos = blerp(startx,starty,endx,endy,  i/time);
        ang = startang + lerp(0,dA, i/time);
        ObjMove_SetPosition(shot, pos[0],pos[1]);
        ObjMove_SetAngle(shot,ang);
        yield;
    }
    ObjRender_SetAlpha(shot,255); ObjShot_SetIntersectionEnable(shot,true); ObjMove_SetSpeed(shot,origspd);
}
Thank you very much for this, that was too complex for me to think about alone, but how I do this in a circle?
The result is only one bullet(or 60 in one position?)
MoveShot(s, ObjMove_GetX(s), ObjMove_GetY(s), ObjMove_GetX(s) - 50, ObjMove_GetY(s), 0, 0, 60);
« Last Edit: January 22, 2018, 11:23:21 AM by jao »
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #969 on: January 21, 2018, 02:44:15 PM »
Ah, right, I originally came here to ask a question of my own.
I've got (among other things) a 2D sprite that goes on top of another 2D sprite, and a task setting its position to the position of the first one. When I move the first one around, though, the second lags behind by a frame, presumably due to the order things are being executed in each frame. Any way I can synchronize them aside from moving both of them every time?
You'll have the frame of difference if the second object position is set before the first object moves (generally because the tasks were started and yielded in that order), or if the first object moves using SetAngle/Speed or similar functions, which only updates positions after the frame is over but before rendering (not that this is relevant for Sprite objects). If it's the first and you can't guarantee execution order, you could use an auxiliary position variable that both objects will move to.

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

PyuDi

  • daily touhou~
  • danmakufu!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #970 on: January 24, 2018, 02:13:25 AM »
My mind was just tangled with if statements and the frame.
What I was trying to do was below:

frame 0 ~ 600: do A
frame 600: yield 60x
frame 660 ~ 1200: do B
frame 1200: yield 60times
frame 1260 ~ 1800: do A
...and so on.
in short, (x=variable)
until frame 600x, do A
when frame 600x, yield 60times
until frame 1200x, do B

in words,
do A, yield, do B, yield, do A, ...and so on.

How can I implement this thing with codes?

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #971 on: January 24, 2018, 03:53:12 AM »
Thank you very much for this, that was too complex for me to think about alone, but how I do this in a circle?
If you mean moving the shot in (part of) a circle, you'll want to pick a center point to rotate around, and use lerp for the angle from the center. Something like:
Code: [Select]
rad=getdist(cx,cy,startx,starty); startarc=getangle(cx,cy,startx,starty); endarc=getangle(cx,cy,destx,desty);
arc=lerp(startarc,endarc,i/time); x=cx+rad*cos(arc); y=cy+rad*sin(arc);
function getangle(x0,y0,x1,y1){return atan2(y1-y0,x1-x0);}
function getdist(x0,y0,x1,y1){return ((x0-x1)^2 + (y0-y1)^2)^0.5;}
I don't think that's what you meant, so I crunched it up to save space, but it's there if you did mean that. Grab those functions either way if you haven't got them, though.

If, as I think you do, you mean making a bunch of shots come out of the original shot in a circle, things are a bit easier.
The result is only one bullet(or 60 in one position?)
MoveShot(s, ObjMove_GetX(s), ObjMove_GetY(s), ObjMove_GetX(s) - 50, ObjMove_GetY(s), 0, 0, 60);
Er, yes, you call that on each copy of the original shot, it doesn't make the copies. Try this instead:
Code: [Select]
let N=60; let radius=50;
ascent(i in 0..N){
    s = CopyShot(origshot); //or whatever you're doing to copy them
    MoveShot(s, ObjMove_GetX(s), ObjMove_GetY(s), ObjMove_GetX(s)+radius*cos(i*360/N), ObjMove_GetY(s)+radius*sin(i*360/N), ObjMove_GetAngle(s), ObjMove_GetAngle(s), 60);
}
Here's the function I use to copy shots, or you can just create the same kind of shot with the original shot's position/angle/etc.

Andi: You're definitely talking too high-level there, just saying. You might not be able to help much.
Whoops, tried to tone it down a bit.


do A, yield, do B, yield, do A, ...and so on.
How can I implement this thing with codes?
Code: [Select]
loop(600){ do A; yield; }
wait(60);
loop(540){ do B; yield; }
wait(60);
Or how I usually do it:
Code: [Select]
let thingtodo=A;
task TdoA { while(thingtodo==A){ do A; yield; } wait(60); TdoB; }
task TdoB { while(thingtodo==B){ do B; yield; } wait(60); TdoA; }
task ChangeThingToDo{
    TdoA;
    loop{
         wait(540); if(thingtodo==A){thingtodo=B;}else{thingtodo=A;}
    }
}
« Last Edit: January 24, 2018, 04:31:21 AM by Andi »
Literally everything in this script will crash and burn.
1CC tracker

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #972 on: January 24, 2018, 03:55:09 AM »
Andi: You're definitely talking too high-level there, just saying. You might not be able to help much.

My mind was just tangled with if statements and the frame.
What I was trying to do was below:
You already have the logic fine. I'm not entirely sure what's troubling you.

Code: [Select]
loop{ // or while(something), etc
  loop(600){
    // A
    yield;
  }
  loop(60){ yield; }
  loop(540){
    // B
    yield;
  }
}

Assuming you actually want to be doing A and B for every frame there, which is what you described.

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

PyuDi

  • daily touhou~
  • danmakufu!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #973 on: January 25, 2018, 07:24:20 AM »
Came with another question.
How can I make a bullet A which erases bullet Bs when A is collided with B?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #974 on: January 25, 2018, 07:43:14 AM »
That problem starts easy enough but can get really complicated depending on what you actually want. If you just want A bullets that erases all other bullets on contact, you can set up A bullets like this:

Code: [Select]
task BulletA{
  // make the bullet here
  ObjShot_SetSpellResist(obj, true);
  while(!Obj_IsDeleted(obj)){
    DeleteShotInCircle(TYPE_SHOT, TYPE_IMMEDIATE, ObjMove_GetX(obj), ObjMove_GetY(obj), deletion_radius);
    yield;
  }
}

Check the parameters for DeleteShotInCircle for more information. This deletes bullets that are not spell-resistant, and sets itself as spell-resistant so it doesn't delete itself.
If you're also adding other bullets into the mix that needs some extra work.
« Last Edit: January 25, 2018, 07:48:04 AM by Drake »

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

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #975 on: January 25, 2018, 08:19:53 AM »
I just noticed my framerate counter is locked at 60, even when frames are definitely being dropped. It's also being displayed in the menu even before loading a script. Messing with the display code in the system script I'm using manipulates the right text, without leaving another one floating there or something, but it's still locked at 60, meaning it's getting 60 back from GetCurrentFps.

Any idea what's causing this/how to fix it?
Literally everything in this script will crash and burn.
1CC tracker

PyuDi

  • daily touhou~
  • danmakufu!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #976 on: January 26, 2018, 01:34:44 AM »
That problem starts easy enough but can get really complicated depending on what you actually want. If you just want A bullets that erases all other bullets on contact, you can set up A bullets like this:

Code: [Select]
task BulletA{
  // make the bullet here
  ObjShot_SetSpellResist(obj, true);
  while(!Obj_IsDeleted(obj)){
    DeleteShotInCircle(TYPE_SHOT, TYPE_IMMEDIATE, ObjMove_GetX(obj), ObjMove_GetY(obj), deletion_radius);
    yield;
  }
}

Check the parameters for DeleteShotInCircle for more information. This deletes bullets that are not spell-resistant, and sets itself as spell-resistant so it doesn't delete itself.
If you're also adding other bullets into the mix that needs some extra work.

Thanks for giving help, I understood. But looks like I need some extra work.
My code is this, while Yellow bullets turned into green bullets, at the same time, I want newly fired yellow bullets to erase the green bullets. Tried putting KagomeKagome; (and other needed ones) at //make the bullet here, but failed.
« Last Edit: January 26, 2018, 02:29:48 AM by PyuDi »

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #977 on: January 26, 2018, 06:40:06 PM »
That would be the CreateShotA1 call. Set up the way you have it, you would run a second task alongside the Kagome one that does the DeleteShot while loop and stuff. So like

Code: [Select]
let obj = CreateShotA1(ex, ey, 3, randa, DS_BALL_L_YELLOW, 2);
task SetDeleteShotEnable(obj){
  ObjShot_SetSpellResist(obj, true);
  while(!Obj_IsDeleted(obj)){
    DeleteShotInCircle(TYPE_SHOT, TYPE_IMMEDIATE, ObjMove_GetX(obj), ObjMove_GetY(obj), deletion_radius);
    yield;
  }
}
SetDeleteShotEnable(obj);
KagomeKagome(obj);

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

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #978 on: January 26, 2018, 11:21:25 PM »
How do I get the filepath of a single from within that single? I'm trying to retrieve the contents of #Title so I only need to change it in one place, but GetScriptInfoA1 takes a filepath, and GetOwnScriptID gives an id number rather than the filepath.
Literally everything in this script will crash and burn.
1CC tracker

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #979 on: January 29, 2018, 08:53:50 PM »
I've been crunching that problem for a while now and there is really no simple solution as far as I can see. The "best" solution might be the simplest -- to just keep a global variable with the script's filename -- but considering your issue is that you want to eliminate redundancy this is questionable.

That being said, I do have a complex solution. In the past day I've brewed up a system that wraps around script management as well as some boss scene management. I've been wanting to do the script wrapping for a while because it has extra uses but your problem piqued my interest and what I ended up implementing happens to solve most cases. The boss scene stuff is necessary because the script stuff alone can't handle scripts that are loaded through boss scenes, which does not expose the script IDs themselves and you have to do some silly messaging between plural and single.

If you're interested I could touch it up and post what I have, but you would have to commit to using the API in your scripts; it isn't incredibly intrusive but it would be a change.

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

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #980 on: January 31, 2018, 12:07:26 AM »
How could I re-create Marisa's nonspells?
I'm talking about the pentagon around her and the pattern.

Edit:
My overlay keeps appearing even when the spell is over
My BG script is here for everyone to see
[attach=1]
[attach=2]
[attach=3]
« Last Edit: January 31, 2018, 09:50:01 AM by Helepolis »
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Andi

  • World's Gayest Danmaku
  • PlaySE("./se/Nyaa.wav");
    • 2hu blog
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #981 on: January 31, 2018, 12:44:51 AM »
If you're interested I could touch it up and post what I have, but you would have to commit to using the API in your scripts; it isn't incredibly intrusive but it would be a change.
If it works when running individual singles, I wouldn't mind having a look at least.

Oh, and my fps counter is still locked at 60. I know this isn't much to go on, but I have no idea where to start looking for the problems. I've noticed two different issues, which I can only hope are related:
-FPS counter is displayed in menu. Which system script is most likely to be causing this? I commented out the line calling TCurrentFps in script/default_system/Default_System.txt, so it shouldn't be that one, but I'm not sure where else it could be since it shows up before even selecting a script.
-GetCurrentFps() always returns 60. What the heck? How does that even happen? It's definitely returning 60 every time, I've tested it by writing the output directly to the log once per frame after creating 10,000 bullets. I would definitely get an error message if there was something like function GetCurrentFps{return 60;} tucked away somewhere, right? ...What the heck?!
Literally everything in this script will crash and burn.
1CC tracker

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #982 on: January 31, 2018, 01:37:05 AM »
If it works when running individual singles
Yeah nope ;P
You aren't going to be able to do that. You can definitely get the list of files in the directory but unless you make a folder structure that's just one script per folder (lmao) there's no way to disambiguate. You need some sort of access to whatever is getting the script to run, and because you can't get access to the default plural script you can't even fiddle around with the defaults to get it to work.

And yeah you can't redefine functions. I'm not really sure what's up there; does it happen with all scripts? Does it happen with a fresh DNH copy? Different computer, if you have access to one? There has to be a difference somewhere.

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #983 on: January 31, 2018, 09:49:17 AM »
My overlay keeps appearing even when the spell is over
My BG script is here for everyone to see
This is insufficient to judge what you're doing. Needs the full script. Currently all I can assume is you're not cleaning up/deleting your objects when the script ends.

Unrelated to your question but out of curiosity: What script am I looking at? Sort of "system" script or something? Which decides to load/unload the BG depending on whether it is a spell card or not?
« Last Edit: January 31, 2018, 09:55:01 AM by Helepolis »

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #984 on: January 31, 2018, 07:14:51 PM »
Sort of, they probably just run the script from the plural.


The issue is just that you don't stop/delete the backgrounds when they should be inactive. Check for bSpell within the background tasks and either delete the backgrounds and end the task, or otherwise make them invisible, or something. Right now there's no reason they shouldn't stay visible.

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

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #985 on: February 01, 2018, 01:02:48 AM »
I finally got it working now :D
The problem that the bg was laying upon other and since my moon had(need) a render priority higher than the rest it was overlaying in the non spell
This is what I have to put to make it work
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #986 on: February 01, 2018, 12:17:16 PM »
Yea so basically hiding it with w/e useful function is present. Some set the Alpha to 0. Some make it visible/invisible using that function and some move it even outside the visible game field.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #987 on: February 03, 2018, 05:01:26 PM »
Good day.
May I, kind of, ask a simple question? Is it possible to earn money by creating own projects on Danmakufu (using my own sprites, music, ect.). In generall, entirely unique project, but just using Danmakufu engine to create it. If no, is there any evidence of that?
Thanks in advance.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #988 on: February 03, 2018, 05:14:10 PM »
Good day.
May I, kind of, ask a simple question? Is it possible to earn money by creating own projects on Danmakufu (using my own sprites, music, ect.). In generall, entirely unique project, but just using Danmakufu engine to create it. If no, is there any evidence of that?
Thanks in advance.

It is perfectly fine to sell games made with Danmakufu. However, the precedents have tended to only sell the games to recoup the convention fees, printing costs, and other costs associated with game production and not selling directly for profit.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #989 on: February 04, 2018, 10:34:59 AM »
Can someone provide me with an example of how to implement History for spell cards? I've been trying to do it with Common data, but I just end up failing, the numbers are always incorrect and don't differ depending on the spell name.

Also, lately I returned to one of my latest issues
So, I want to reveal parts of background only in certain places and shapes, kinda like Doremy's occult attack in AoCF (http://tinypic.com/r/33m9b2d/9), how do I do it? I tried using render targets, but it's too complicated and difficult to use without a tutorial.
The only progress I had is that I could change the scale of the mask, but after it reaches the certain point, it just copies itself(something you would see if you put SourceRect of the sprite to 512 when it's original size is 256). So, I would really appreciate the help on this topic, since I don't know anything about HLSL.
« Last Edit: February 04, 2018, 12:38:50 PM by IIe4eNiIIIe »