Author Topic: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)  (Read 269618 times)

Marisa Kirisame

  • "So what if she's a girl, da ze?"
  • Marisa X Alice for life
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #840 on: March 31, 2013, 06:43:03 AM »
ok I got it fixed (I wanted it to move like a ticking clock) The guys on the IRC channel helped but Drake's Idea is pretty close to that. =)
"Ok I admit it. The endless night, corrupting the moon, hiding the human village and putting those funny little hats on statues; it's all Alice's fault. Now bitch, get out of the way!" -Marisa Kirisame from Touhou 8 Imperishable Night.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #841 on: March 31, 2013, 09:23:16 PM »
I'm so close to finishing my player script.
http://pastebin.com/fUN8fyYa
I don't know what's the problem. I want the bullet to expand when it reaches the oldest enemy. Then, I want the bullet to fade, before I delete it to make it less sketchy.
The expanding and fading part never happens.
What's the problem?
Currently a normal player

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #842 on: March 31, 2013, 11:13:50 PM »
You are checking if the object x/y is equal to the enemy x/y, and in most cases this is not desirable since the movement of both can be unreliable for them to fall right on each other. Alternatively, you can check if the distance between both if smaller than, say 16 or whatever value you'd like. Here is a function that returns distance:
Code: [Select]
function GetDistance(x1,y1,x2,y2){
return (((x2-x1)^2+(y2-y1)^2)^(1/2))
}
Also, I'm not sure if it's your intention, but in your code, your object will only grow when the condition is met, and so if, say the enemy dies, it will stop growing and set a new angle (though there's no movement in the code you gave either so it probably won't regrow either). Do you want it like this (but add some movement) or do you want it to keep increasing once it hits the enemy initially?

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #843 on: March 31, 2013, 11:20:24 PM »
I want it to hit the enemy, and keep growing.  The bullet is basically Reimu's Spell.
And for the function, is x1 the Object's x or the enemy's? Same with y1.
Currently a normal player

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #844 on: March 31, 2013, 11:38:23 PM »
As long as you keep the x and y consistent with the 1 or 2, it doesn't matter the order. (so if you want then objectx, objecty, enemyx, enemyy then that works)

As for the the bullet, it'd be easier to have them do separate yields in that case, and I edited it together for you. I haven't tested it but it should work in the same manner as your current one: http://pastebin.com/XS7qVib7 (not sure why pastebin formatted the first few lines very oddly)

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #845 on: April 01, 2013, 02:28:31 AM »
Thanks, it actually helped, now the problem is that alpha won't respond to me. It's still on 255 alpha and I only want about 150 alpha. I even used:
ObjEffect_SetVertexColor(obj,i,150,255,255,255); // I is for the vertexes
It won't set the alpha to 150.
Currently a normal player

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #846 on: April 01, 2013, 04:50:07 AM »
Personally I'm wondering why you're increasing the XYs to expand the graphic. You can you just as well with SetScale.

So where are you putting this transparency line, and when do you want it to be active? If you want the alpha value to start at 150 then disappear when it hits the enemy, you'll have to put it before the stuff you pastebinned, and change the descent(k in 0..20) to descent(k in 0..15), since 15*10 has it start the loop at 150.

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

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #847 on: April 01, 2013, 08:50:58 PM »
Um, i have an error that makes my Okuu texture tiled  :ohdear:

it looks like that:

http://img593.imageshack.us/img593/3708/whatee.png

http://pastebin.com/VqdXbVtr

i have no clue if that's the right place to post this here, but here's the code > . <

I guess it collides with the @BackGround , but I'm not entirely sure  :ohdear:

Large code goes in pastebin. Large images not in full img tags please. -Hele
« Last Edit: April 17, 2013, 10:00:02 AM by Natmaz »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #848 on: April 01, 2013, 09:46:09 PM »
http://pastebin.com/537Pqycd Here is my new task. (Edit: I changd the texture midway through, doesn't interfere with anything though.)
It won't fade out. It just completely disappears. It isn't skipping over the fading out part either.
I'm not too fluent in object effect making.
Currently a normal player

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #849 on: April 02, 2013, 12:06:20 AM »
Change descent(k in 0..100) to count from 100, descent(k in 100..0)

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #850 on: April 02, 2013, 08:16:10 AM »
My code.

http://pastebin.com/vXUJptwv

It gives me an error about frames.
Easy Modo? That's for kids, and for me.

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #851 on: April 02, 2013, 03:36:00 PM »
You never defined the variable frame.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #852 on: April 02, 2013, 03:48:41 PM »
Also, if the C++ highlighting did anything, you're also missing a " in your Cutin.

It should be

CutIn(YOUMU,"Power Sign "\""Chaotic Spin""\", imgCutIn, 0, 0, 380, 600);

Also, you never increment either f or frame, so frame will never hit 60.

The Noodles Guy

  • Flip the screen
  • What if Seija met a guy with bipolar disease?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #853 on: April 02, 2013, 07:03:41 PM »
silly me, I missed the frame++; thing :derp:

thanks
Easy Modo? That's for kids, and for me.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #854 on: April 04, 2013, 11:02:50 PM »
Hm... So I'm making a Yuyuko boss fight and was wondering how to give her fan that folding out effect like in TD...

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #855 on: April 05, 2013, 12:36:35 AM »
Hm... So I'm making a Yuyuko boss fight and was wondering how to give her fan that folding out effect like in TD...
In ObjEffect_SetVertexXY, Make the Y start really close together or just at the same Y. The X is the same.
Then you can slowly widen the Y to its original size. (Not that slow though.)
If it were me, I'd do this:
Code: [Select]
let v = 0;
loop(20){
   ObjEffect_SetVertexXY(obj,0,GetEnemyX-150,GetEnemyY-v);
   ObjEffect_SetVertexXY(obj,1,GetEnemyX+150,GetEnemyY-v);
   ObjEffect_SetVertexXY(obj,2,GetEnemyX+150,GetEnemyY+v);
   ObjEffect_SetVertexXY(obj,3,GetEnemyX-150,GetEnemyY+v);
   v+=5;
   yield;
}
This is if my picture is 300 by 100 pixels.
This should work.

I was also wondering, how does one use a custom font in danmakufu?
« Last Edit: April 05, 2013, 03:43:26 AM by Lavalake »
Currently a normal player

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #856 on: April 05, 2013, 05:23:20 AM »
PhantomSong: ascent(t in 0..max){ ObjEffect_SetScale(obj, 0, t/max); } or something similar (actually this won't reach max size, make sure it does)

Lavalake: You can't in 0.12. At best you recreate a font effect from scratch.
« Last Edit: April 05, 2013, 05:24:52 AM by Drake »

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

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #857 on: April 05, 2013, 11:47:40 PM »
I would create a font effect from scratch, I just don't know how to implement it so that whenever I call the function, the parameter will be where is is located on the screen and the length/letters.
For example:
CreateCustomText(GetClipMinX+50,GetClipMaxY-100,Power){
And then insert some effect stuff.
}
How do I create a system that doesn't know the length of the word or what letters there are. But the parameters tell them.
Spoiler:
Juuni Jumon game has a very complex custom font system.
This question might not belong here but, does PH3 let you have custom fonts?
Currently a normal player

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #858 on: April 06, 2013, 03:10:53 AM »
This question might not belong here but, does PH3 let you have custom fonts?
I'm not sure how you'd go about making a font system in 0.12m, but ph3 does have a way to install and use a font within its own text objects. You could also technically use a sprite list to create a 'font' as well if it's in an image format.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #859 on: April 06, 2013, 04:01:37 AM »
How do I create a system that doesn't know the length of the word or what letters there are. But the parameters tell them.
font systems are complex
Essentially you're passing in text, each character is read and it's assigned a rect based on the character. You can assign rects manually based on the character, but you can also use ascii numerical representation if need be to just calculate the rects of a character's image. The length of the string would determine how long the final rendered image would be.

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

fondue

  • excuse me
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #860 on: April 07, 2013, 03:29:09 PM »
     
Hm... So I'm making a Yuyuko boss fight and was wondering how to give her fan that folding out effect like in TD...
In ObjEffect_SetVertexXY, Make the Y start really close together or just at the same Y. The X is the same.
Then you can slowly widen the Y to its original size. (Not that slow though.)
If it were me, I'd do this:
Code: [Select]
let v = 0;
loop(20){
   ObjEffect_SetVertexXY(obj,0,GetEnemyX-150,GetEnemyY-v);
   ObjEffect_SetVertexXY(obj,1,GetEnemyX+150,GetEnemyY-v);
   ObjEffect_SetVertexXY(obj,2,GetEnemyX+150,GetEnemyY+v);
   ObjEffect_SetVertexXY(obj,3,GetEnemyX-150,GetEnemyY+v);
     yield;
}
This is if my picture is 300 by 100 pixels.
This should work.

Or, if you want the fan to shoot out and slowly stop you could use descent.
Code: [Select]
let n=*number*;
let t=*number*;
   descent(i in 0..n){
   ObjEffect_SetVertexXY(obj,0,GetEnemyX-150,GetEnemyY-(i/n*t));
   ObjEffect_SetVertexXY(obj,1,GetEnemyX+150,GetEnemyY-(i/n*t));
   ObjEffect_SetVertexXY(obj,2,GetEnemyX+150,GetEnemyY+(i/n*t));
   ObjEffect_SetVertexXY(obj,3,GetEnemyX-150,GetEnemyY+(i/n*t));
     yield;
   }
Change 't' to the desired result.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #861 on: April 07, 2013, 05:57:16 PM »
I have a question.  :V
http://pastebin.com/VRLpNvVd
This crashes Danmakufu, does anyone know why?
I think it has to do with the effect object, and the familiars.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #862 on: April 07, 2013, 06:49:22 PM »
I have a question.  :V
http://pastebin.com/VRLpNvVd
This crashes Danmakufu, does anyone know why?
I think it has to do with the effect object, and the familiars.

The only thing I notice is:
Code: [Select]
function Wait(let frames){loop(frames){yield;}}
let frames == frames?

Don't know if that is the cause, but...

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #863 on: April 07, 2013, 06:53:59 PM »
The only thing I notice is:
Code: [Select]
function Wait(let frames){loop(frames){yield;}}
let frames == frames?

Don't know if that is the cause, but...

Probably is. Wait takes one argument, let frames. So it should be either
Code: [Select]
function Wait(let frames){loop(let frames){yield;}}or
Code: [Select]
function Wait(frames){loop(frames){yield;}}The latter, of course, is what you should be doing.

[On a seperate note, I feel like I really shouldn't be helping him with a troll script, but whatever.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #864 on: April 07, 2013, 06:57:26 PM »
Probably is. Wait takes one argument, let frames. So it should be either
Code: [Select]
function Wait(let frames){loop(let frames){yield;}}or
Code: [Select]
function Wait(frames){loop(frames){yield;}}The latter, of course, is what you should be doing.

[On a seperate note, I feel like I really shouldn't be helping him with a troll script, but whatever.
I was using that in other stage scripts. So I dont know why it wouldnt work now.
What? Why not? D:

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #865 on: April 07, 2013, 07:00:03 PM »
Probably is. Wait takes one argument, let frames. So it should be either
Code: [Select]
function Wait(let frames){loop(let frames){yield;}}or
Code: [Select]
function Wait(frames){loop(frames){yield;}}The latter, of course, is what you should be doing.

Depends on if he got another problem in his script or not, but I didn't see anything special by myself.
Also, using wait as the function name is preferable to Wait, because If I remember correctly, It may clash with an event function named Wait.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #866 on: April 07, 2013, 07:07:01 PM »
Depends on if he got another problem in his script or not, but I didn't see anything special by myself.
Also, using wait as the function name is preferable to Wait, because If I remember correctly, It may clash with an event function named Wait.
Well I got that directly from the intermediate tutorial, it worked in every other stage script I made though.
Edit: It crashes as in it says, "Danmakufu.exe has stahped working". No error
« Last Edit: April 07, 2013, 07:11:24 PM by Qwertyzxcv »

gtbot

  • Master of ScreenSplit
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #867 on: April 07, 2013, 07:12:06 PM »
This crashes Danmakufu, does anyone know why?
From what you've pasted, your script looks fine, but given this, you likely have a pathing error from when you are trying to create an enemy since that can cause a crash.

let frames == frames?
Doing it by either func(let argument) or func(argument) should have no difference.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #868 on: April 07, 2013, 07:20:09 PM »
Doing it by either func(let argument) or func(argument) should have no difference.

Ok, never knew one could use combinations like that when using functions. Excuse my lack of knowledge :|

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #869 on: April 07, 2013, 07:58:25 PM »
That's going in the tutorial~~~

Qwertyxcv, you realize that it's a troll script, right? Maybe it's crashing because of the reason why you want it to.

  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 3.txt",0, 0, 0, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 3.txt", 0, 0, 0, 0, 0);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(60);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(30);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(30);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(30);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(30);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);
  CreateEnemyFromFile(GetCurrentScriptDirectory~"fiynull spppppelkard 2.txt", GetCenterX-200, GetCenterY-50, 1.8, 0, 0);
  Wait(10);


+ the sheer amount of bullets you create is obviously going to crash Danmakufu.