Author Topic: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry  (Read 240776 times)

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #30 on: April 12, 2014, 05:18:35 AM »
If you're using bullets/lasers, this function cannot be used.
Wut. GetObjectDistance() works with any objects.
« Last Edit: April 12, 2014, 05:21:00 AM by Drake »

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #31 on: April 12, 2014, 07:04:41 AM »
Wut. GetObjectDistance() works with any objects.
Why is the wiki confusing us then  :ohdear:
* Helepolis reads mkm documentation
I see, it mentions none of this so we'll need to fix the wiki.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #32 on: April 13, 2014, 01:13:22 AM »
Forgot about this, sorry. You mostly had it right, but you forgot or missed that smoothstep is supposed to bound the interpolated values between 0 and 1...
...All you need to do instead is have your t0 value go from 0 to 1, so if you want it to last t1 frames, you increase t0 by 1/t1 per frame.
Thanks for this, as this was the only part I was messing up because I didn't fully understand. Because I was too busy overthinking it (ex. "How Do I make sure it moves to X location at X amount of frames..."). This was kind of important for me so thank you again.

Now, If I wanted to do a mirrored version of the smoothstep (from Origin to Target and back), I would have to divide Time(t1) by half, then have it smoothstep the first half and then the other half, so that it moves within the full time specified before I divided t1?
Also, do I have to break the smoothstep if I call another movement?

Also, how do I make sure any movement that I do (with the ObjMove functions) move to the location that I want at the time that I want?

Oh, and Length is listed under Other Functions but is Not listed in the Functions Main page.
« Last Edit: April 13, 2014, 01:41:02 AM by TheScriptwriter »

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #33 on: April 13, 2014, 09:07:48 AM »
Now, If I wanted to do a mirrored version of the smoothstep (from Origin to Target and back), I would have to divide Time(t1) by half, then have it smoothstep the first half and then the other half, so that it moves within the full time specified before I divided t1?
I'm not entirely sure what you're looking to do here. This sounds like you would smooth start, smooth into the destination, smooth start back, and smooth back into the origin. If this is what you want, then yeah it would just be two smoothstep moves at half the time each.
Quote
Also, do I have to break the smoothstep if I call another movement?
Mostly depends on whether the movement method either:
1) Changes movement speed and/or angle
2) Changes movement position based on current position
3) Changes movement position based on precalculated position
Your current smoothstep does #3, and so would override any other movement you'd try to apply until it's done.

Quote
Also, how do I make sure any movement that I do (with the ObjMove functions) move to the location that I want at the time that I want?
Well, ObjMove_SetDestAtTime() is pretty much exactly that. If you want more complicated movement to work within a number of frames you'd have to write it up yourself or precalculate how much time you need.

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #34 on: April 13, 2014, 02:13:03 PM »
How do I use custom fonts? I'm trying to change the font on the DefaultSystem, but all I get is Arial instead of the font I want.

Here is my code.
Code: [Select]
@Initialize
{
InitFrame();
TScore();
TGraze();
TPlayerLife();
TPlayerSpell();
TBossLife();
TBossTimer();
TCurrentFps();
TReplayFps();
InstallFont(dirCurrent~"ImpressBT.ttf"); //this is a line I added for the font
}
[...]
task TScore()
{
let objScore = ObjText_Create();
ObjText_SetFontType(objScore, "ImpressBT.ttf"); //this is another line I added to change the font
ObjText_SetText(objScore, "Score");
[...]
« Last Edit: April 13, 2014, 02:15:51 PM by rikako_asakura »

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #35 on: April 13, 2014, 02:14:56 PM »
This sounds like you would smooth start, smooth into the destination, smooth start back, and smooth back into the origin. If this is what you want, then yeah it would just be two smoothstep moves at half the time each.
Yep. That's what I want, so that's what I'll do.
Well, ObjMove_SetDestAtTime() is pretty much exactly that. If you want more complicated movement to work within a number of frames you'd have to write it up yourself or pre-calculate how much time you need.
Well, it's like I want to combine ObjMove_SetDestAtFrame and ObjMove_SetDestAtWeight/Acceleration together, where the obj speeds up or slows down to the desired position, but within the time I choose.
But from what you say, I would have to make something like that on my own.

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #36 on: April 13, 2014, 08:38:15 PM »
How do I use custom fonts? I'm trying to change the font on the DefaultSystem, but all I get is Arial instead of the font I want.
For ObjText_SetFontType you have to specify the name of the font, not its file name. Double click on the font file to display information about it, including its name.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #37 on: April 14, 2014, 12:15:10 AM »
How do I use custom fonts? I'm trying to change the font on the DefaultSystem, but all I get is Arial instead of the font I want.

I threw together a section on fonts.

http://dmf.shrinemaiden.org/wiki/Sparen%27s_0.12m_to_ph3_Transition_Guide#Fonts

I hope it is helpful.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #38 on: April 14, 2014, 09:29:07 AM »
For ObjText_SetFontType you have to specify the name of the font, not its file name. Double click on the font file to display information about it, including its name.

I threw together a section on fonts.

http://dmf.shrinemaiden.org/wiki/Sparen%27s_0.12m_to_ph3_Transition_Guide#Fonts

I hope it is helpful.

Thank you to both of you! I managed to get it to work.

Gusano Wornis

  • Member of Team Mystique
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #39 on: April 14, 2014, 08:50:01 PM »
how to replay comments?

just asking because page 1 :v
carrying dead weight since 2015~

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #40 on: April 14, 2014, 09:24:30 PM »
A replay comment is just a string. We can use this to transfer commondata back and forth between replays by storing them all as strings and then splitting them up again before the replay starts.

RPS = IntToStrin(GetCommonData("Something",0)) ~"/"~IntToStrin(GetCommonData("Something",0))~"";

Use SplitString to break them apart by a certain character like "/". SplitString(RPS,"/"); split the string into an array every time it reads a "/" symbol

of course, RPS would be SplitString(GetReplayInfo(indexreplay,REPLAY_COMMENT),"/");

Alternatively we can use SaveCommonDataToReplay which would be easier to manage but replays are almost certain to break if you save too much (anything more than 1 piece of commondata and it will always save off synced replays). So replay comments are a nice workaround to ensure that you won't have any problems.

Chuckolator

  • ex-perfecter, good times
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #41 on: April 17, 2014, 02:24:48 PM »
oh wait, wrong thread. my bad, delete this <_<
Aiming to perfect every stage in Touhou. loljk don't care anymore You can find my perfects here or here.
Best perfects so far include UFO 6, MoF 4 and IN 6A.

formerly known as Seiga Kaku

Lunarethic

  • Local Trashy Edgelord
  • *
  • I can cut people with all this edge
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #42 on: April 21, 2014, 09:46:33 AM »
why is does this code keep spawning bullets on the topleft corner of myscreen? o.O even though theres nothing that i said to make it like that
http://pastebin.com/pK3ty7xD
like this
いつもニコニコあなたの隣に這いよる!生放送!は好き。月です~す。略してニコニャル
Learned how to use a custom shotsheet : 12/28/13 *clapclapclap*
東方謎佚光 ~ Dimensional Light Abscence Work In Progress Touhou Fangame

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #43 on: April 21, 2014, 10:46:37 AM »
ObjMove_GetX() defaults to 0 when the object referenced is deleted, or if the id doesn't correspond to any object. The parent bullets are being deleted somehow (going off-screen?) but the task keeps running, so when the child bullets are fired they spawn at (0, 0).

While we have that code posted, I should mention that rather than having those two bullet tasks, you can easily merge them into one just by having another parameter like dir_inc or something so where you have that dir += 10; or dir -= 10; you just say dir += dir_inc; . Similarly you can squash the two testfire tasks into one by giving it one parameter that changes dir+= 15; and dir-=30; into dir+= whatever; and another parameter that goes directly into the objectbullet call like objectbullet(bossX,bossY,5,8,dir,0.50,65,10,dir_inc); .

If you can see what I mean it might make it a bit easier to modify later on and it cuts down on repeated code.
« Last Edit: April 21, 2014, 10:49:47 AM by Drake »

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #44 on: May 01, 2014, 10:12:10 PM »
I'm trying to make an object spawn other objects when it hits a side, but I'm not sure how to use ObjShot_AddShotA1 within it. I've messed around with locations of functions, but nothing works correctly. Here's my code:

task bulletProp(obj) {   
   while(!Obj_IsDeleted(obj)) {
      if(ObjMove_GetX(obj) < 0||ObjMove_GetX(obj) > 376) {   
         let bullet2 = ObjShot_Create(OBJ_SHOT);
         ObjShot_Regist(bullet2);
         ObjMove_SetSpeed(bullet2,2);
         ObjShot_SetGraphic(bullet2,144);
         ObjShot_SetDelay(bullet2,5);
         ObjMove_SetAngle(bullet2,180-ObjMove_GetAngle(obj));
         
         loop(4) {
            
            ObjMove_SetPosition(bullet2,ObjMove_GetX(obj),ObjMove_GetY(obj));
            ObjShot_AddShotA1(obj,bullet2,1);
            wait(2);
         }         
      }
      
      if(ObjMove_GetY(obj) < 0) {
         ObjMove_SetAngle(obj,-ObjMove_GetAngle(obj));
      }
      yield;
   }
}
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #45 on: May 02, 2014, 02:27:41 AM »
What this currently does is check if obj is outside the x-boundaries, and if so, create new shot object bullet2 and fire it. Then set bullet2's position to be the same as obj, wait two frames; repeat this four times with the same bullet2 object. That is, if you removed the AddShotA1() call. If you removed the SetPosition(), you might get a flicker of a bullet before it vanishes. Before anything else I'd like you to comment out the AddShotA1(), then change the wait(2) to wait(20) and see what happens. Once you do that, comment out the SetPosition() instead (keep the wait(20)) and see what happens then. It might help you realize what's actually going on with your current code.

That being said, you were close in the sense that if you rearranged and removed some things it would have worked, but functionally it was pretty far off.
Code: [Select]
while(!Obj_IsDeleted(obj)) {
   if(ObjMove_GetX(obj) < 0||ObjMove_GetX(obj) > 386) {   
      loop(4) {
         let bullet2 = ObjShot_Create(OBJ_SHOT);
         // set up bullet2
         ObjShot_AddShotA1(obj,bullet2,0);
      }
   }
   if(ObjMove_GetY(obj) < 0) {
      ObjMove_SetAngle(obj,-ObjMove_GetAngle(obj));
   }
   yield;
}
« Last Edit: May 02, 2014, 02:29:49 AM by Drake »

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #46 on: May 02, 2014, 03:03:54 AM »
This works, but it spawns all of the bullets on top of each other. How could I configure it so that they spawn with a noticeable delay between each fire?
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #47 on: May 02, 2014, 04:09:50 AM »
That was intentional, I was hoping you'd modify it from there. Well, the last parameter of AddShotA1() is the number of frames afterward to fire the bullet, so if you want to fire each bullet from wherever obj is at the time, you can change that depending on when you want the other bullets to fire (the way it is, it might go offscreen first, though). Or, you could just shoot the new bullet from obj's position in the first place, and wait() a bit after you fire each bullet to do effectively the same thing.
« Last Edit: May 02, 2014, 04:18:00 AM by Drake »

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #48 on: May 02, 2014, 04:24:13 AM »
I guess I should've been more specific; when I add a value for the wait(), only one bullet spawns at a time, but when I change the last parameter, it spawns 4x+4 bullets on top of each other where x is the parameter.
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #49 on: May 02, 2014, 05:04:44 AM »
So, you loop through that bullet code four times and say for each new bullet you tell them to fire from the parent after n frames. What do you think is going to happen after n frames? All four bullets will fire. You have to give each one a different number of frames to fire after.

As for the increasing number of bullets, say you finish your loop of four bullets. The script then does the top-boundary check, then yields. What happens on the next frame? It does the x-boundary check again. And the parent bullet will still be over the boundary, and the whole thing will run again. So each frame it's going to add four more bullets to fire at time n, up until you actually get to time n.

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #50 on: May 16, 2014, 03:10:25 AM »
I've been trying to figure out how to make a decent background for scripts, but I have no idea what any of the effect/image/whatever functions do or how to use them. Is there any sort of guide for drawing BGs in ph3?

EDIT: I'm asking because the wiki's ph3 tutorial is missing the background functions section and it'd be really inefficient to learn 0.12m's functions and translate them.
« Last Edit: May 16, 2014, 05:30:04 PM by Baron_Blade »
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #51 on: May 17, 2014, 08:16:06 AM »
I've been trying to figure out how to make a decent background for scripts, but I have no idea what any of the effect/image/whatever functions do or how to use them. Is there any sort of guide for drawing BGs in ph3?

EDIT: I'm asking because the wiki's ph3 tutorial is missing the background functions section and it'd be really inefficient to learn 0.12m's functions and translate them.
Aye, it is completely gone the @BackGround. In ph3, create a regular 2D sprite and set the drawing priority type to the background value.
http://dmf.shrinemaiden.org/wiki/Object_Functions#Obj_SetRenderPriorityI

For example:
Code: [Select]
let obj = ObjPrim_Create(OBJ_SPRITE_2D);
<etcetc for the scale,rect,etc>
Obj_SetRenderPriorityI(obj,20); // code to decide render priority which is basically a value between 0-100 afaik.

An object having priority 80 will be drawn on top of a one with a lower value. You can for example layer things on top of each other more precisely like this. So less worrying about code order some what.  The somewhat traditional drawing order from 0.12m are in effect. For example drawing stuff on values 80+ will be drawing it on top of the player/bullet/etc. Example 2:
Code: [Select]
Obj_SetRenderPriorityI(obj,20);  ( Background layer )
Obj_SetRenderPriorityI(obj,30);  ( Player layer)
Obj_SetRenderPriorityI(obj,31);  <--- will be drawn on top of the 30 value because 31 is > 30.
Obj_SetRenderPriorityI(obj,80);  ( HUD layer )
« Last Edit: May 17, 2014, 08:17:49 AM by Helepolis »

Fumi

  • Dragon of Seven Colors
  • Disaster in Takamagahara
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #52 on: May 20, 2014, 10:54:02 PM »
Hello!

I don't know if this is the correct place to ask but I have a few questions and a possible request
Sorry for possible bad English :<

-Is there any equivalent for pH3 for the function SetMovePositionHermite? If there isn't, I'd love if someone could reply with an equivalent :<

-Recently I tried to make a library for effects, I tried to make the new DDC styled pentagram (the one with slow 3D rotation) but with no success, as I don't actually know how 3D graphics work in pH3

Here is my function

Code: [Select]
task MagicCircleV3() {
/*placed on the main loop
Creates a Magic Circle that follows the boss around
DDC styled circle, rotates in XYZ slowly
*/
let angle = 0;




let circle = ObjPrim_Create(OBJ_SPRITE_3D);
ObjPrim_SetTexture(circle, imgEffect);

let enmx = ObjMove_GetX(objEnemy);
let enmy = ObjMove_GetY(objEnemy);
let x1 = -128;
let y1 = -126;


//ObjRender_SetAlpha(circle, 150);

while(!Obj_IsDeleted(objEnemy)) {
ObjSprite3D_SetSourceDestRect(circle, 127, 81, 255, 206);
ObjSprite3D_SetDestRect (circle, x1-128, y1-125, x1, y1);


ObjRender_SetX(circle, ObjMove_GetX(objEnemy));
ObjRender_SetY(circle, ObjMove_GetY(objEnemy));

//ObjRender_SetAngleX(circle, angle);
//ObjRender_SetAngleY(circle, angle);
//ObjRender_SetAngleZ(circle, angle);


angle++;
yield;
}


}

-I'm also trying to make the charge animation that features petals/snowflakes/leaves but besides from the problems shown above, each time I try to draw something outside from the screen, it gets stuck on the edges. Also any idea how to actually move primitive objects? idk if graphics type objects should be threaten as such, because the ObjMove functions seem to not work on them....

Here is the code
Code: [Select]
//ObjRender_SetAlpha(petal, 150);


ObjSprite2D_SetSourceRect(petal, 194, 230, 221, 249);

ObjSprite2D_SetDestCenter(petal);

ObjRender_SetAngleX(petal, angle);
ObjRender_SetAngleY(petal, angle);
ObjRender_SetAngleZ(petal, angle);


ObjMove_SetDestAtSpeed(petal, ObjMove_GetX(objEnemy), ObjMove_GetY(objEnemy), 5);
angle=angle+round(rand(0,5));

}

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #53 on: May 21, 2014, 04:52:28 AM »
Note sure why you're using ObjSprite3D_SetSourceDestRect() and then ObjSprite3D_SetDestRect(). More than that, for your purposes I don't think you need a 3D Sprite object, just a 2D Sprite object. They're both Render objects and so can use the functions you want. First just make a 2D Sprite object that follows the boss. Then use SetAngleZ() to spin it, then use SetAngleX() and Y() to spin the rest.

As for your second problem, Sprite objects aren't Move objects, so you can't use Move functions on them.



In order to move around Render objects you'd have to define your own movement functions for them. For SetDestAtSpeed() this is just some pythagoras:
Code: [Select]
task ObjRender_SetDestAtSpeed(obj, x, y, s){
    let ox = ObjRender_GetX(obj);
    let oy = ObjRender_GetY(obj);
    let dist = ((x-ox)^2 + (y-oy)^2)^0.5;
    let dx = (x-ox)/dist*s;
    let dy = (y-oy)/dist*s;
    loop(floor(dist/s)){
        ox += dx;
        oy += dy;
        ObjRender_SetX(obj, ox);
        ObjRender_SetY(obj, oy);
        yield;
    }
    ObjRender_SetX(obj, x);
    ObjRender_SetY(obj, y);
}

This won't have exactly the same behaviour as the Move version simply because Render objects don't have any movement speed or angle properties. If you call it multiple times on the same object, the one called last takes priority but if it finishes before the other calls would, the object will jump to the position it would be at with the other calls. It isn't a big deal since if you wanted to stack movements you would do something different anyways.
« Last Edit: May 21, 2014, 04:55:18 AM by Drake »

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #54 on: May 21, 2014, 02:41:56 PM »
I tried to make that simple 2D background, but it won't work. I made sure to call the background script, so what did I do wrong with it?

let img = ObjPrim_Create(OBJ_SPRITE_2D);
let imgBg = GetCurrentScriptDirectory ~ "resource_img/background.png";

ObjPrim_SetTexture(img,imgBg);
ObjSprite2D_SetSourceRect(img,0,0,256,256);
ObjSprite2D_SetDestCenter(img);
Obj_SetRenderPriorityI(img,20);
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #55 on: May 21, 2014, 08:46:49 PM »
You have the source rectangle and destination mapped but no object position. It's going to default to (0, 0). Aside from that it should work; really right now it should look like the bottom-right quarter of the image is sitting in the top-left corner of the screen.

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #56 on: May 21, 2014, 09:18:19 PM »
I defined the position, but the image doesn't even appear. Do I have to set a blend type or something?
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #57 on: May 21, 2014, 10:24:33 PM »
No, it means you did something else wrong. Are you sure the background script is run? Put something easily verifiable in it like a CreateShot or something to make sure it's called. Make sure the image is actually being loaded; you can do this by checking the first option under Option in the config.exe, and checking the Texture tab when the game runs.

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

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #58 on: May 21, 2014, 11:10:33 PM »
I'm sure that the script is being called because Danmakufu recognized errors in it when I tried to make the sprite appear. And it turns out that the texture wasn't being loaded, but I have no idea why this should be the case.
Normal 1cc's: LLS, MS, EoSD, PCB, IN, MoF, SA, UFO, TD, DDC
Hard 1cc's: EoSD, PCB, IN
Extra Clears: EoSD, PCB + Phantasm, IN, MoF, TD, DDC
Phantasmagoria Trues Clears: Standard Regular
Goals: Phantasmagoria Trues Unseen Standard 1cc, MoF XNM, MoF XNF

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #59 on: May 22, 2014, 05:37:34 AM »
You're not being enough sure. Errors popping doesn't necessary mean anything aside then you made mistakes with the code.

When in doubt, debugging out. As Drake suggested, put noticeable things in the script that will assure you the function/script is called. I usually either use sound effects or text drawing on screen. If the script/function is in fact active, try to replace your image with something else that worked in the past as well and see how that turns out.