Author Topic: Danmakufu Q&A/Problem Thread v3  (Read 211724 times)

Drake

  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #30 on: January 29, 2010, 12:16:07 AM »
They're right, GetSpeedX exists.

However, GetSpeed gets the exact pixel-per-frame angle-speed of the enemy, whereas GetSpeedX returns -1 as long as it's moving left, returns 1 as long as you're moving right, and 0 if you are not moving whatsoever.

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

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread v3
« Reply #31 on: January 29, 2010, 01:23:29 AM »
Okay... Now, about global variables.

I need to have a variable called, say, alltogether, to determine whether or not the effect of the pattern takes place over time or all at once, but the argument is tied up getting the side the familiar is starting on.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #32 on: January 29, 2010, 01:25:23 AM »
SetCommonData("variablename", alltogether);

And where ever you need to get the variable:

GetCommonData("variablename");

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #33 on: January 29, 2010, 03:42:12 AM »
Hey guys, just want to let you know something.

Ever notice how when using effect objects, whenever you set them as alpha rendering, whenever you set the alpha value in ObjEffect_SetVertexColor to a lower value, it seams like the RBG colors go down with it?
The truth is, it does! If you set an image in @DrawLoop with half opacity, and the same image using Effect Objects with the same alpha value as the one in @DrawLoop, the object effects seam a bit darker even though the RBG are all 255, don't they?
It seams Danmakufu renders effect objects a little differently than it does in @DrawLoop.
It only took me a few minutes to figure out how to fix this so it doesn't go dark, so here it is.
When drawing the image in effect objects, you'll actually have to make two objects. One in Alpha, and the other in Additive.

The effect object with Additive rendering goes beneath the one with Alpha. Meaning, if you were to put them both on the same ObjEffect_SetLayer, the ADD-rendered one goes in first. This will brighten the layer as much as it's darkened underneath the Alpha-rendered object, leaving the texture itself as bright as it really is, and other textures underneath the two unaffected, without loosing any brightness. Altogether, it makes effect objects look a lot more beautiful. It looks really dull if you use half-transparency using ALPHA rendering and only that one object. The ADD one is kind of needed to stabilize it all. I'll give an example, if someone asks for it.  IMPORTANT NOTE: there must be TWO images loaded. Any transparency will come out white in the ADD-rendered object, so the transparent parts must be black. Sometimes black may show when using Alpha rendering, so there must be two images, one transparent for Alpha, and one black-for-tranparent for ADD.


This is a real NEED if you make custom CutIns. You'll like the result.
« Last Edit: January 29, 2010, 03:55:45 AM by Fujiwara no Mokou »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #34 on: January 29, 2010, 06:13:57 AM »
Hey guys, just want to let you know something.

Ever notice how when using effect objects, whenever you set them as alpha rendering, whenever you set the alpha value in ObjEffect_SetVertexColor to a lower value, it seams like the RBG colors go down with it?
The truth is, it does! If you set an image in @DrawLoop with half opacity, and the same image using Effect Objects with the same alpha value as the one in @DrawLoop, the object effects seam a bit darker even though the RBG are all 255, don't they?

This is nothing unknown.

It seams Danmakufu renders effect objects a little differently than it does in @DrawLoop.
It only took me a few minutes to figure out how to fix this so it doesn't go dark, so here it is.
When drawing the image in effect objects, you'll actually have to make two objects. One in Alpha, and the other in Additive.

The effect object with Additive rendering goes beneath the one with Alpha. Meaning, if you were to put them both on the same ObjEffect_SetLayer, the ADD-rendered one goes in first. This will brighten the layer as much as it's darkened underneath the Alpha-rendered object, leaving the texture itself as bright as it really is, and other textures underneath the two unaffected, without loosing any brightness. Altogether, it makes effect objects look a lot more beautiful. It looks really dull if you use half-transparency using ALPHA rendering and only that one object. The ADD one is kind of needed to stabilize it all. I'll give an example, if someone asks for it.  IMPORTANT NOTE: there must be TWO images loaded. Any transparency will come out white in the ADD-rendered object, so the transparent parts must be black. Sometimes black may show when using Alpha rendering, so there must be two images, one transparent for Alpha, and one black-for-tranparent for ADD.


This is a real NEED if you make custom CutIns. You'll like the result.

Nothing new either. And yea here is the problem: it will also brighten already present additive drawn objects/textures on the same layer as well. The method has both advantages and disadvantages.


Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #35 on: January 29, 2010, 07:41:12 AM »
it will also brighten already present additive drawn objects/textures on the same layer as well. The method has both advantages and disadvantages.
Just tested it. This method has no effect on other object or textures on the same layer.  The alpha rendering alone darkens the colors of the layer, and the layers beneath that giving it a silhouette-like effect. The additive drawing beneath that cancels the silhouette effect out and gives it a normal transparency without darkening the texture or any beneath that.

Here's what I got with just 20% transparency.




The top is object effect with my method. The one below is an object effect used with only alpha rendering. Notice how it's darker, and it'd get worse the more tansparent it gets, and effects the textures below it. The one below is the same image rendered in @DrawLoop using SetGraphicRect and DrawGraphic. It looks exactly the same as the top, doesn't it? The purpose was to give an alpha blend on a layer above the character's sprite with the same colors as DrawLoop, which doesn't darken the colors.
« Last Edit: January 29, 2010, 08:16:27 AM by Fujiwara no Mokou »

Nuclear Cheese

  • Relax and enjoy the danmaku.
    • My homepage
Re: Danmakufu Q&A/Problem Thread v3
« Reply #36 on: January 29, 2010, 05:32:39 PM »
SetCommonData("variablename", alltogether);

And where ever you need to get the variable:

GetCommonData("variablename");

Quick addendum:

GetCommonDataDefault("variablename", defaultvalue);

returns the value of the "global variable" if it has been defined, but returns the given default value if it has not.  This is useful in some situations, since GetCommonData will bomb your script if the indicated variable hasn't been defined yet.


One example of this - I use common data to pass difficulty parameters between the stage script and the boss script for NTSD.  But the boss script can be run by itself as well, where said difficulty parameters won't be defined (because they're defined in the stage script only).  So, using GetCommonDataDefault, I can allow the boss script to define default parameters so it can run by itself.
to quote Naut:
"I can see the background, there are too many safespots."
:V

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #37 on: January 29, 2010, 07:10:13 PM »
Just tested it. This method has no effect on other object or textures on the same layer.  The alpha rendering alone darkens the colors of the layer, and the layers beneath that giving it a silhouette-like effect. The additive drawing beneath that cancels the silhouette effect out and gives it a normal transparency without darkening the texture or any beneath that.

Here's what I got with just 20% transparency.
screens.jpg

The top is object effect with my method. The one below is an object effect used with only alpha rendering. Notice how it's darker, and it'd get worse the more tansparent it gets, and effects the textures below it. The one below is the same image rendered in @DrawLoop using SetGraphicRect and DrawGraphic. It looks exactly the same as the top, doesn't it? The purpose was to give an alpha blend on a layer above the character's sprite with the same colors as DrawLoop, which doesn't darken the colors.

I tested this on my custom cutin script 3.0. And it messes up the the "spell card attack!" effect objects by making them even more brighter. Because the Cutin portrait effect and spell card text are both on Layer 2. Spellcard attack is drawn on top of the Cutin portrait. And applying the method works for the Cutin, not for the spell card text, because they are drawn later on and thus get affected.

Reversing is the only option, but that would look out of place. And layering them up isn't an option either. Like I said, it has downsides and upsides. Using it for single effects isn't a problem but in these kind of cases, it is.

Also I checked MoF / SA / UFO cutin. Excluding SA/UFO ( because they dont dissapear on screen ) MoF has also somewhat a darkening alike cutin portrait which is barely noticeable tbh. Just a note.
« Last Edit: January 29, 2010, 07:12:11 PM by Helepolis »

Furienify

  • Yeehaw!
  • Equestrian Fansubber
    • Youtube Channel
Re: Danmakufu Q&A/Problem Thread v3
« Reply #38 on: January 29, 2010, 07:39:40 PM »
Silly question but this reminds me-

Is there a 'preferred' size for Cutin graphics? I know it'd ideally have to be smaller than the screen, and that I want it to be .png with the transparent background, but am I missing anything else?

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #39 on: January 29, 2010, 08:10:02 PM »
After fucking around in PoSR with the unusually wide cutins I made, I came to the conclusion that it's better to trim them so that they're not getting in the way while you're trying to PoC the point items or reposition yourself. About 200 pixels should be the max horizontally, any vertical size is fine.

250ish wide should probably be the max for dialogue so they don't overlap too much.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #40 on: January 29, 2010, 08:17:04 PM »
I just tested it myself on your custom cutin script, and I see no such problem. Have you tried putting the Alpha-rendered layer ATOP the ADD? If you want them both on the same layer, you must call the ADD object first.
If you didn't that would explain why you had that problem.
The ADD is supposed to be in first, and the Alpha on top of that. This way, any of the darkened colors get brightened up an equal amount, canceling the two out and maintaining the true color. For example, if you have 50% transparency, you'd want 255/2 set as the alpha value in both the ADD and ALPHA value in SetVertexColor.
If you want 70% transparency, you'd want 255/100*70 as the alpha value in alpha, and 255/100*30 as the color value in ADD (or alpha, since it works there too in SetVertexColor).
If you want 20% transparency, you'd want 255/100*20 as the alpha and color values of both. The alpha value of the ADD does not surpass the alpha value of ALPHA, or it will glow like you say it does and give that unwanted bright effect.
« Last Edit: January 29, 2010, 08:18:44 PM by Fujiwara no Mokou »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #41 on: January 29, 2010, 08:26:44 PM »
I'll double check it as it was early in the morning when I was trying it out.

Edit:

    let cut = "script\DanceContest\system\arapcut.png";  <--- trans bg
    let cut2 = "script\DanceContest\system\arapcut2.png"; <--- black bg

   cutin("KANAKO", "Fever Sign: "\""Disco Grooves"\",cut2,0,0,256,512);  <-- ADD type effect
   cutin2("KANAKO", "Fever Sign: "\""Disco Grooves"\",cut,0,0,256,512); <-- Alpha type effect

Result:



My eyes =.=
« Last Edit: January 29, 2010, 08:34:33 PM by Helepolis »

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #42 on: January 29, 2010, 08:48:44 PM »
Take away the second cutin, and add an alpha object so the function "cutin" needs to be called once.
No wonder why it's bright. You're doubling the Additive blend for the "spellcard attack text" because they're separate functions.


Also, question:
I need a way to change Danmakufu's text to a custom png sheet. Is there one made so that all the letters I call in a function like so- "S-P-E-L-L-C-A-R-D(space)-N-A-M-E", each letter being an object effect with monospacing.
Has such a template been made?
« Last Edit: January 29, 2010, 08:57:26 PM by Fujiwara no Mokou »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #43 on: January 29, 2010, 09:04:08 PM »
Take away the second cutin, and add an alpha object so the function "cutin" needs to be called once.
No wonder why it's bright. You're doubling the Additive blend for the "spellcard attack text" because they're separate functions.
I am lost here. According to your post, both an additive and alpha image type ( black and trans ) need to be called at the same time and the ADD has to go first. Meaning I spawn ADD first then the ALPHA.

The cutin function is the effect object and function at the same time. I don't get how you tested it. Start showing code here because you are being not clear and fuzzy. Also if you got something to contribute, do it fully and don't spout stuff like: "If there is demand". It only makes one look arrogant you know.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread v3
« Reply #44 on: January 29, 2010, 09:23:42 PM »
Also, question:
I need a way to change Danmakufu's text to a custom png sheet. Is there one made so that all the letters I call in a function like so- "S-P-E-L-L-C-A-R-D(space)-N-A-M-E", each letter being an object effect with monospacing.
Has such a template been made?
http://www.mediafire.com/download.php?nvouhuoxnyy
Play around with it for a bit; if you can't figure out how it works then ask me. It's only fixed-width, but someone in one of the Ijiyatsu threads (Blargel I think, but don't shoot me if I'm wrong) modified it to be variable-width, but that broke the alignment parameter.

Edit: Also, feel free to modify it to your needs. I only uploaded the general-use version - I modified it for my personal uses since then, but didn't release it.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #45 on: January 29, 2010, 09:28:00 PM »

  cutin("KANAKO", "Fever Sign: "\""Disco Grooves"\",cut2,0,0,256,512);  <-- ADD type effect
 cutin2("KANAKO", "Fever Sign: "\""Disco Grooves"\",cut,0,0,256,512); <-- Alpha type effect
<---NO


  cutin("KANAKO", "Fever Sign: "\""Disco Grooves"\",cut2,0,0,256,512);  <-- ADD type effect<---ALPHA type effect

The add and alpha objects are in the same task.


Code: [Select]
let object image=allyourstuffhere,XYcoordinates etc
let object2=imageallyourstuffhere, XYcoordinates copypasted allyouhavetochangeis ObjEFFECT_SETRENDERSTATE


would be like this....
Code: [Select]
/***************************************************************************************************************
* Script: Cutin script
* Author: Helepolis
* version 3.0
* Types: 1 - MOF    Middle appear -> float to top -> leave top
*              2 - SA/UFO Diagonal right top entrance -> slowmode -> follow path to leave
*        3 - UFO2  Horizontal left entrance -> slowmode -> follow path to leave (Byakuren style)
*
* This script is no longer bound any other scripts or extra functions.
* Full support in one single file.
**************************************************************************************************************/

    // new cutin function eliminates the old commondata style.
    task cutin(type,spellcardname,cutinImg,left,top,right,bottom){
yield;

// Charismatic variables
let obj = Obj_Create(OBJ_EFFECT);
              let obj2=Obj_Create(OBJ_EFFECT);///////////////////second object, this will be your alpha
let alphret = 0;
let as = 0;
let c = 0;
let x = 0;
let y = 0;

    let XYbLR = left + right / 2;
    let XYbTB = top + bottom / 2;

if(type == "KANAKO") { x = GetClipMaxX; y = GetCenterY+10; }
if(type == "NAZRIN") { x = GetClipMaxX+256; y = GetCenterY-120; }
if(type == "BYAKUREN") { x = GetClipMinX-256; y = GetCenterY; }

// Experts attention: you can disable this if you want your own Spellcard text but for common people it is default active.
    CutIn(YOUMU, spellcardname,cutinImg,0,0,0,0);

summontext;
summonhexagon;

Obj_SetPosition(obj,x,y);
Obj_SetPosition(obj2,x,y);////////copypaste but change id
ObjEffect_SetRenderState(obj,ADD);///////add will be on the drawn first
ObjEffect_SetRenderState(obj2,ALPHA);//////alpha drawn last
ObjEffect_SetTexture(obj,cutinImg);
ObjEffect_SetTexture(obj2,cutinImg);//////everything else stays the same
ObjEffect_SetLayer(obj,1);
ObjEffect_SetLayer(obj2,1); //////SetVertexColor included

// this is a special function to handle the cutin alpha modification seperate.
cutinEffect_Alphret(obj,obj2,as,alphret);

// Nifty effect vertex setting ( basically a rectangular using the parameters )
ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
        ObjEffect_SetPrimitiveType(obj2, PRIMITIVE_TRIANGLESTRIP);
ObjEffect_CreateVertex(obj, 4);
ObjEffect_CreateVertex(obj2, 4);
ObjEffect_SetVertexXY(obj, 0, -XYbLR, -XYbTB);
ObjEffect_SetVertexXY(obj2, 0, -XYbLR, -XYbTB);
ObjEffect_SetVertexUV(obj, 0, left, top);
ObjEffect_SetVertexUV(obj2, 0, left, top);
ObjEffect_SetVertexXY(obj, 1, XYbLR, -XYbTB);
ObjEffect_SetVertexXY(obj2, 1, XYbLR, -XYbTB);
ObjEffect_SetVertexUV(obj, 1, right, top);
ObjEffect_SetVertexUV(obj2, 1, right, top);
ObjEffect_SetVertexXY(obj, 2, -XYbLR, XYbTB);
ObjEffect_SetVertexXY(obj2, 2, -XYbLR, XYbTB);
ObjEffect_SetVertexUV(obj, 2, left, bottom);
ObjEffect_SetVertexUV(obj2, 2, left, bottom);
ObjEffect_SetVertexXY(obj, 3, XYbLR, XYbTB);
ObjEffect_SetVertexXY(obj2, 3, XYbLR, XYbTB);
ObjEffect_SetVertexUV(obj, 3, right, bottom);
ObjEffect_SetVertexUV(obj2, 3, right, bottom);

// hooray for complex movement path. Depending on the cutin type, perform cutin.
while(! Obj_BeDeleted(obj)){
if(type=="KANAKO"){
if(c<15){x-=10; y+=10}
if(c>=15 && c<45){y-=4;}
if(c>=45){y-=2;}
if(c>120){ Obj_Delete(obj); }
}
if(type=="NAZRIN"){
if(c<21){x-=20; y+=5}
if(c>=21 && c<100){x--; y+=0.5;}
if(c>=100){x-=20; y+=5;}
if(c>120){ Obj_Delete(obj); Obj_Delete(obj2);}
}
if(type=="BYAKUREN"){
if(c<21){x+=20;}
if(c>=21 && c<100){x++;}
if(c>=100){x+=20;}
if(c>120){Obj_Delete(obj); Obj_Delete(obj2);}
}
Obj_SetPosition(obj,x,y); Obj_SetPosition(obj2,x,y);
c++;
yield;
}
    }

    // seperate function to make the fadein and fadeout effect.
    task cutinEffect_Alphret(obj,obj2,as,alphret) {
let c = 0;
loop{
  ObjEffect_SetVertexColor(obj,0,alphret,255,255,255);   ObjEffect_SetVertexColor(obj2,0,alphret,255,255,255);
ObjEffect_SetVertexColor(obj,1,alphret,255,255,255); ObjEffect_SetVertexColor(obj2,1,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,2,alphret,255,255,255);   ObjEffect_SetVertexColor(obj2,2,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,3,alphret,255,255,255);   ObjEffect_SetVertexColor(obj2,3,alphret,255,255,255);
if(as==0){alphret+=20; if(alphret>250){as=1;} }
if(as==1){c++; if(c==90){ as=2; } }
if(as==2){alphret-=10; if(alphret<10){as=4;} }
yield;
}
    }
   
    // handler for summoning the diagonal text
    task summontext {
let yyPos = 0;
loop(5){
spellcardtext(GetClipMinX,GetClipMaxY-22-yyPos,1.5);
spellcardtext(GetClipMaxX,GetClipMinY-30+yyPos,-1.5);
yyPos+=54;
yield;
}
    }

    // handler for summoning the hexagons
    task summonhexagon {
let dir = 0;
loop(8){
hexagontext(GetCenterX+100,GetCenterY+150,1.5,dir,1.4,1.4);
hexagontext(GetCenterX+100,GetCenterY+150,1.5,dir,1.2,1.2);
hexagontext(GetCenterX+100,GetCenterY+150,-1.5,-dir,1.0,1.0);
hexagontext(80,100,1.5,dir,0.8,0.8);
dir+=45;
yield;
}
    }

//************************************************************************
// Text animation for spellcard spawn ( HEXAGON STYLE )
//   
// alphret - alpha value
// as - variable acting like a switch
// c - counter variable
//************************************************************************

    let CSD = GetCurrentScriptDirectory;
    let textdata = CSD ~ ".\system\spellcardanm.png";
    LoadGraphic(textdata);

    task hexagontext(x,y,v,draai,sx,sy) {
let obj = Obj_Create(OBJ_EFFECT);
let alphret = 0;
let as = 0;
        let c = 0;
let angle = draai;
let speed = v;

Obj_SetPosition(obj,x,y);
ObjEffect_SetRenderState(obj,ADD);
ObjEffect_SetTexture(obj,textdata);
        ObjEffect_SetScale(obj, sx, sy);
ObjEffect_SetLayer(obj,2);

ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
ObjEffect_CreateVertex(obj, 4);

ObjEffect_SetVertexXY(obj, 0, -48, -128);
ObjEffect_SetVertexUV(obj, 0, 0, 0);
ObjEffect_SetVertexXY(obj, 1, 48, -128);
ObjEffect_SetVertexUV(obj, 1, 128, 0);
ObjEffect_SetVertexXY(obj, 2, -48, -104);
ObjEffect_SetVertexUV(obj, 2, 0, 32);
ObjEffect_SetVertexXY(obj, 3, 48, -104);
ObjEffect_SetVertexUV(obj, 3, 128, 32);

while(! Obj_BeDeleted(obj)){
ObjEffect_SetAngle(obj,0,0,angle);
  ObjEffect_SetVertexColor(obj,0,alphret,255,255,255);
ObjEffect_SetVertexColor(obj,1,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,2,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,3,alphret,255,255,255);

if(as==0){alphret+=20; if(alphret>185){as=1;} }
if(as==1){c++; if(c==90){as=2;} }
if(as==2){alphret-=10; if(alphret<0){ Obj_Delete(obj); } }
angle += speed;

yield;
  }
    }

//************************************************************************
// Text animation for spellcard spawn ( Diagonal text )
//   
// alphret - alpha value
// as - variable acting like a switch
// c - counter variable
//************************************************************************
    task spellcardtext(x,y,v) {
let obj = Obj_Create(OBJ_EFFECT);
let alphret = 0;
let as = 0;
        let c = 0;

Obj_SetPosition(obj,x,y);
Obj_SetSpeed(obj,v);
Obj_SetAngle(obj,-35);
ObjEffect_SetAngle(obj,0,0,-35);
ObjEffect_SetRenderState(obj,ADD);
ObjEffect_SetTexture(obj,textdata);
ObjEffect_SetLayer(obj,2);

ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
ObjEffect_CreateVertex(obj, 4);
ObjEffect_SetVertexXY(obj, 0, -1024, -16);
ObjEffect_SetVertexUV(obj, 0, 0, 0);
ObjEffect_SetVertexXY(obj, 1, 1024, -16);
ObjEffect_SetVertexUV(obj, 1, 2048, 0);
ObjEffect_SetVertexXY(obj, 2, -1024, 16);
ObjEffect_SetVertexUV(obj, 2, 0, 32);
ObjEffect_SetVertexXY(obj, 3, 1024, 16);
ObjEffect_SetVertexUV(obj, 3, 2048, 32);

while(! Obj_BeDeleted(obj)){
  ObjEffect_SetVertexColor(obj,0,alphret,255,255,255);
ObjEffect_SetVertexColor(obj,1,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,2,alphret,255,255,255);
  ObjEffect_SetVertexColor(obj,3,alphret,255,255,255);
if(as==0){alphret+=20; if(alphret>185){as=1;} }
if(as==1){c++; if(c==90){as=2;} }
if(as==2){alphret-=10; if(alphret<0){ Obj_Delete(obj); } }
yield;
}
    }

http://www.mediafire.com/download.php?nvouhuoxnyy
Thanks
« Last Edit: January 29, 2010, 09:29:39 PM by Fujiwara no Mokou »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #46 on: January 29, 2010, 09:36:22 PM »
Now that suddenly explains a lot more. Now indeed it shows the way you shown in your screenshots. =.=

And that brings up to the next thing I wonder which I somehow guess why. Why do two effects in one function work and two effects in separate functions not? I guess it has to do with the yield; as the second effect object spawns after technically a yield. Perhaps this way Danmakufu handles the blending different.

Edit: Fixed engrish. How the hell did I wrote desperate and not separate...
« Last Edit: January 29, 2010, 09:40:56 PM by Helepolis »

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread v3
« Reply #47 on: January 29, 2010, 09:41:43 PM »
Now that suddenly explains a lot more. Now indeed it shows the way you shown in your screenshots. =.=

And that brings up to the next thing I wonder which I somehow guess why. Why do two effects in one function work and two effects in desperate functions not? I guess it has to do with the yield; as the second effect object spawns after technically a yield. Perhaps this way Danmakufu handles the blending different.


No, the "Spellcard Attack" png image is called twice because the function is called twice.
I tried to say that earlier /sweatdrop

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #48 on: January 29, 2010, 10:02:21 PM »
* Helepolis headdesks

I totally see the issue now. God I can like smash my head through anything now at this moment. No excuses. That was just poor show.

Edit: well let's say I totally missunderstood this line:

Quote from: Mokou
Take away the second cutin, and add an alpha object so the function "cutin" needs to be called once.
I thought take away second cutin as the line =,= and didn't understood you were pointing at the Textanim and Hexagon functions.

* Helepolis goes silently to bed.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #49 on: January 30, 2010, 03:58:01 AM »
Don't worry Hele it happens to all of us :(

Re: Danmakufu Q&A/Problem Thread v3
« Reply #50 on: January 30, 2010, 05:42:19 AM »
Garpakdfjlkdgh
Posting...Please Wait Warmly

Ok, Same Problem, This is the script i'm working with

Upon playing the Plural File I get two errors, both to do with Data.txt

Code: [Select]
---------------------------
ScriptError「C:\Users\Brandon\Desktop\th_dnh\script\EX_Prisimrivers\Lyrica\Lyrica 01.txt」
---------------------------
未定義部分(Load)があります。
(変数宣言の前後に「;」を忘れている部分がありませんか?)(20行目)

Load;

SetLife(900);

SetMovePosition02(GetCenterX,GetCenterY-60,50);

ShotInit;

}



   @MainLoop{

yield;

frame++;

~~~
---------------------------
OK  
---------------------------


Code: [Select]

---------------------------
ScriptError「C:\Users\Brandon\Desktop\th_dnh\script\EX_Prisimrivers\Lyrica\Lyrica 01.txt」
---------------------------
引数がありません(52行目)

   }@DrawLoop{

Draw_Lyrica;

}

   @Finalize{DeleteGraphic(Lyrica);}

}
~~~
---------------------------
OK  
---------------------------



I DONT GET WHAT I AM DOING WRONG, I HAVE ABSOLUTLY NO ABSOLUTE PATH...PATH.....WHAT EVER!
« Last Edit: January 30, 2010, 05:45:03 AM by Demonbman »

Furienify

  • Yeehaw!
  • Equestrian Fansubber
    • Youtube Channel
Re: Danmakufu Q&A/Problem Thread v3
« Reply #51 on: January 30, 2010, 06:01:53 AM »
Ok, this will sound stupid, but does anyone ever actually translate their errors? >_>

Because for you I get:

---------------------------
ScriptError「C:\Users\Brandon\Desktop\th_dnh\script\EX_Prisimrivers\Lyrica\Lyrica 01.txt」
---------------------------
Undefined portion (Load) there.
(Before and after the variable declaration ";" Do not forget that part?) (Line 20)

Nothing 'bout a data script here.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #52 on: January 30, 2010, 06:04:21 AM »
#include_function".\..\Data.txt" is in before @initalize

Data.txt contains Load; and Draw_Lyrica; If you run the Single Scripts, it works fine

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 v3
« Reply #53 on: January 30, 2010, 08:08:08 AM »
Code: [Select]
---------------------------
ScriptError「C:\Users\Brandon\Desktop\th_dnh\script\EX_Prisimrivers\Lyrica\Lyrica 01.txt」
---------------------------

I'm guessing this is probably not the problem, but there's a slight chance that it might be... Does danmakufu even accept spaces in paths? "Lyrica 01"... try using "Lyrica_01" instead... I thought of this cause... if you're just using single files... then of course it can load it, but since you're using the plural file... maybe there's a problem with it trying to find things when there's spaces? ??? I don't really know, but I hope this helps...
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Re: Danmakufu Q&A/Problem Thread v3
« Reply #54 on: January 30, 2010, 08:21:20 AM »
I'm guessing this is probably not the problem, but there's a slight chance that it might be... Does danmakufu even accept spaces in paths? "Lyrica 01"... try using "Lyrica_01" instead... I thought of this cause... if you're just using single files... then of course it can load it, but since you're using the plural file... maybe there's a problem with it trying to find things when there's spaces? ??? I don't really know, but I hope this helps...
It still raises and error

Infy♫

  • Demonic★Moe
  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #55 on: January 30, 2010, 11:41:51 AM »
i wonder if there's a way to completely make STG_FRAME dissappear and let the player move through the once covered areas

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #56 on: January 30, 2010, 02:14:37 PM »
@Demonbman:

Okay. I found the mistake. Apparently you accidentally the line #ScriptVersion[2] in your pluralscripts. This line has to be included in the beginning block of every script that danmakufu can run by itself, otherwise bad stuff happens.

Code: [Select]
#TouhouDanmakufu[Plural]
#Title[Lyrica Boss]
#ScriptVersion[2]

Now the plural works.
« Last Edit: January 30, 2010, 02:47:28 PM by Iryan »
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."

Re: Danmakufu Q&A/Problem Thread v3
« Reply #57 on: January 30, 2010, 04:38:12 PM »
@Demonbman:

Okay. I found the mistake. Apparently you accidentally the line #ScriptVersion[2] in your pluralscripts. This line has to be included in the beginning block of every script that danmakufu can run by itself, otherwise bad stuff happens.

Code: [Select]
#TouhouDanmakufu[Plural]
#Title[Lyrica Boss]
#ScriptVersion[2]

Now the plural works.
What the crap? THANK YOU! MY WEEK LONG PROBLEM HAS BEEN SOLVED!!!!

/
Lol I accidentallly the line
« Last Edit: January 30, 2010, 04:43:40 PM by Demonbman »

Drake

  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #58 on: January 30, 2010, 06:08:34 PM »
I'm going to headdesk right here, if that's alright with you.

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

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #59 on: January 30, 2010, 06:14:19 PM »
I don't know if this issue (or it's solution) is known already, but here it goes:

On the quest for the proper music for my script, I noticed that danmakufu won't loop ogg files properly. It repeats a short part of the ending of the theme in between the loops, causing the stuff to sound really awkward in most cases. After tinkering around with Audacity (pun very much intended), I noticed why this happens:

Danmakufu will loop the ogg files only at the end of a full second. If the file length in seconds is not (almost) an integer, and it pretty much never is, then the remaining time up to the full second is filled up with the previous second.

The solution was to simply cut the theme so that its length in seconds is a tiny fraction of a second below an integer value, for example, 119.9995 seconds. Depending on the tune you are trying to loop, this may be difficult to do without butchering the transition anyways, but it is possible.

I don't know if the same problem exists with mp3s or other sound files, but I am not in the mood to test that too right now.

~_~
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."