Author Topic: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)  (Read 268002 times)

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #90 on: October 25, 2011, 12:44:13 PM »
Well, I have a surface, and on this surface is drawn a picture. And the picture is not drawn out of the surface.


Download Link here

This is a short text file that contains the two functions I just made:
ImageOverImageA1(obj, path, InX, InY, radset)
 - You must create a primitive object in your own script, then put that into the obj parameter
    + (Example: let ImgMove = ObjPrim_Create(OBJ_PRIMITIVE_2D); )
 - path is the path to the image you want in a circle
 - InX is the middle  X coordinate of the radius that will be drawn in the circle
 - InY is the middle  Y coordinate of the radius that will be drawn in the circle
 - radset is the radius of the image that will be drawn

SetNewImageRender(obj, InX, InY, radset)
 - Parameters are the same as above, except these will only update the image to render on the already existing object, so only call this once you have called ImageOverImageA1 first

This is just the base for the effect you want, you must manually set the Object Position on your own, #Include this script in your own script, and other such things for effects such as setting the scale or alpha.

Also I'm not entirely sure if this is what you wanted, but I made it match that example image you showed (except for the fade effect, you will have to create a triangle strip and put it around the circle or something similar).
« Last Edit: October 25, 2011, 12:51:18 PM by gtbot »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #91 on: November 02, 2011, 01:18:57 AM »
Having problems with Danmakufu ph3

I am able to start the game perfectly, and no errors pop up.

I am able to see the scripts in the Directory

However, I am unable to play them no matter what keys I press on the keyboard. What do I do, and what is my problem?

Note:
I have Applocale, if you ask.

TheMasterSpark

  • Lunatic lemurialist
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #92 on: November 13, 2011, 09:18:14 PM »
Having problems with Danmakufu ph3

I am able to start the game perfectly, and no errors pop up.

I am able to see the scripts in the Directory

However, I am unable to play them no matter what keys I press on the keyboard. What do I do, and what is my problem?

Note:
I have Applocale, if you ask.

Can you describe the situation a bit more? Have you pressed the Z key to select a script?

Anyway, I've got a question of my own. I'm being a bit lazy now, but is there any feasible way to get two sets of player controls running at the same time? I've been thinking about the potentials of co-op play, but can it actually be done? Are there enough input keys to go around? There'd only be a single player script running, but perhaps the second player could be created like an option object to the first player and then controlled independently?

Shockman

  • Some idiot
  • I can't believe I got this account back .|.|.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #93 on: November 19, 2011, 04:33:51 AM »
Anyway, I've got a question of my own. I'm being a bit lazy now, but is there any feasible way to get two sets of player controls running at the same time? I've been thinking about the potentials of co-op play, but can it actually be done? Are there enough input keys to go around? There'd only be a single player script running, but perhaps the second player could be created like an option object to the first player and then controlled independently?

If you go into the config.exe and set the main player's controls to different keys, and then create a separate script for the second player and use GetVirtualKeyState to control the second player, then it might be possible. But I'm not sure that GetVirtualKeyState would end up following the original keys, I don't think they will.
« Last Edit: November 19, 2011, 04:49:55 AM by Shockman »

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #94 on: November 19, 2011, 05:40:13 AM »
If you go into the config.exe and set the main player's controls to different keys, and then create a separate script for the second player and use GetVirtualKeyState to control the second player, then it might be possible. But I'm not sure that GetVirtualKeyState would end up following the original keys, I don't think they will.
I think it won't work. Virtual key values are predefined constants.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #95 on: November 19, 2011, 06:58:17 AM »
Yes, but the very definition of a virtual keyboard implies it's controlled by the program, not your keyboard itself. If you change the keymap around it'll reflect those changes.

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

Shockman

  • Some idiot
  • I can't believe I got this account back .|.|.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #96 on: November 19, 2011, 07:02:38 AM »
Yes, but the very definition of a virtual keyboard implies it's controlled by the program, not your keyboard itself. If you change the keymap around it'll reflect those changes.

That's what I thought.  :wat:

In that case, I don't know any other way for it to work.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #97 on: November 24, 2011, 11:54:54 PM »
It's already been a few month but there seems to be rather little love for ph3. I'd like to know if it would be better to continue using 0.12m, or to use ph3, for a beginner. I've played with 0.12m a little, and can do some basics, but if ph3 is the inevitable future I might as well just learn it. I'm just troubled by how few scripts and tutorials there are for ph3.

Formless God

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #98 on: November 25, 2011, 12:44:28 AM »
Use ph3 because as you said, it's the inevitable future. The basic stuff are similar to 0.12m for the most part so the old tuts would still work.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #99 on: November 25, 2011, 02:06:55 AM »
It's already been a few month but there seems to be rather little love for ph3. I'd like to know if it would be better to continue using 0.12m, or to use ph3, for a beginner. I've played with 0.12m a little, and can do some basics, but if ph3 is the inevitable future I might as well just learn it. I'm just troubled by how few scripts and tutorials there are for ph3.
1. It's still in beta. At the pace mkm seems to be working, we might have a full release by January.
2. Most tutorials learned from 0.12 can easily be applied to ph3, even if they aren't literally the same thing. If you understand the tutorials in 0.12 and understand the differences in ph3, then it should be simple to apply the standard tutorials.
3. Just continue using ph3 if you've barely even scraped the surface of 0.12 anyways.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #100 on: November 25, 2011, 03:54:25 AM »
Glad I'm not the only one, I'm also a beginner here, and I really want to make a game project like Touhou. But when I frst came here, ph3 also released, so I thought I should wait till there's some tuts about it. Since I'm pretty clueless how to start this.

But I decide I should start to research it now, I hope I can get some help from you guys ^w^.

Anyway, I'm trying to learn about user defined bullet (shotdata). I have some questions to make

Quote
ShotData{
   id = 1 //ID - Default Green Shots
   rect = (49,197,69,233)
   render = ALPHA
   alpha=164
   collision = 16
}

As I learned
id: to be recalled later in main code
rect: left, top, right, bottom of the bullet in the image

I have no ideas of the rest, but I guess alpha is opacity of the bullets

And about "rect", how do you know the exact region of the bullet you need, or you have to measure in the image by yourself?

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #101 on: November 25, 2011, 04:28:03 AM »
Something like that
Code: [Select]
ShotData{
id=1 // Unique ID
rect=(1,358,32,387) //x1, y1, x2, y2
render=ADD // Render type - ADD or ALPHA
angular_velocity = 0 // Makes bullet spin (doesn't seem to work yet
delay_color= (128,128,128) // The color of the delay texture (r,g,b)
alpha=164 // Alpha
collision = 16 // Collision radius, i.e. bubble shots have smaller collision than their texture.
}

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #102 on: November 25, 2011, 05:52:50 AM »
You can figure out the bounding rectangle of the bullet in most image editing programs by moving the cursor to the desired point. If the image loads properly, MS Paint tells you each point very easily. Photoshop you have to go Window -> Info to get the position of your cursor.

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #103 on: November 25, 2011, 05:07:29 PM »
How do you make the FW/TD lifebar?
« Last Edit: November 25, 2011, 05:39:12 PM by JmLyan »

NonexistentFlower

  • 悪ノ花(君)
  • Oh... And... I'm a boy.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #104 on: November 28, 2011, 07:35:22 AM »
I've been viewing a number of tutorials relating to microthreading using v0.12.
However, I'm having modifying shot angle/velocity (after firing) in ph3 (Beta 3).
(Let me clarify:
In my script, I have a small task to fire bullets using CreateShotA1.
I tried a While (!Obj_IsDeleted) loop with a delay ( loop (30) { yield; } ) and to use (ObjMove_SetAngle) with the output of CreateShotA1. No change is observed however.)

Could you help me with this?
......I said nothing.

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #105 on: November 28, 2011, 09:10:19 AM »
You should use
ObjMove_AddPatternA1 ,ObjMove_AddPatternA2, ObjMove_AddPatternA3 or ObjMove_AddPatternA4

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #106 on: November 28, 2011, 08:14:27 PM »
For some reason, this crashes danmakufu when it comes to the portion of the stage where I have added it:

Code: [Select]
scene = ObjEnemyBossScene_Create();
ObjEnemyBossScene_Add(scene, 0, "./boss/RanN1.dnh");
if(GetDif>2){
//ObjEnemyBossScene_Add(scene, 0, "./boss/RanS1.dnh");
}
ObjEnemyBossScene_LoadInThread(scene);
while(!Obj_IsDeleted(scene)){yield;}

If I remove it then it doesn't crash. Any idea what the problem might be?

Here's the link to the entire script if that helps (it's quite long though): http://pastebin.com/mZSusVPs

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #107 on: November 29, 2011, 04:56:12 AM »
For some reason, this crashes danmakufu when it comes to the portion of the stage where I have added it:
./ only works in headers, use GetCurrentScriptDirectory instead

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #108 on: November 30, 2011, 06:52:10 PM »
Does anyone know why the "ITEM_POINT" and "ITEM_POINT_S" arguments of "EV_GET_ITEM" doesn't work?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #109 on: November 30, 2011, 09:50:35 PM »
How do you make the FW/TD lifebar?
Whatever the equivalent of effect objects is... You'll need to use a triangle fan with the first point in the center of your circle image. Alternatively, you can use a triangle strip and bend a straight line into a circle and slowly shrink it.

Does anyone know why the "ITEM_POINT" and "ITEM_POINT_S" arguments of "EV_GET_ITEM" doesn't work?
Scoured the wiki but I have no idea what EV_GET_ITEM is. It doesn't sound like a function so you might be mixed up about something.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #110 on: December 01, 2011, 03:21:41 PM »
Scoured the wiki but I have no idea what EV_GET_ITEM is. It doesn't sound like a function so you might be mixed up about something.

EV_GET_ITEM is an @Event argument used in player script to get when a certain item is picked up by the player. But only the ITEM_POINT and ITEM_POINT_S doesn't work.

On a side note, is there any other way to get when a point item is picked up?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #111 on: December 01, 2011, 03:48:50 PM »
EV_GET_ITEM is an @Event argument used in player script to get when a certain item is picked up by the player. But only the ITEM_POINT and ITEM_POINT_S doesn't work.
Ehhh, I dunno then. Maybe it's a bug, but I don't use ph3 at all.

Quote
On a side note, is there any other way to get when a point item is picked up?
You can try doing something like this instead:
Code: [Select]
task Something {
    let points = GetPoint();
    loop {
        while(points == GetPoint()){
            yield;
        }

        // Anything run here will only happen when the total number
        // of points picked up changes (which will usually be when a
        // point is picked up)

        // Set the points variable to equal GetPoint() so it'll enter the
        // while loop again
        points = GetPoint();
    }
}
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #112 on: December 01, 2011, 03:56:52 PM »
You can try doing something like this instead:
Code: [Select]
task Something {
    let points = GetPoint();
    loop {
        while(points == GetPoint()){
            yield;
        }

        // Anything run here will only happen when the total number
        // of points picked up changes (which will usually be when a
        // point is picked up)

        // Set the points variable to equal GetPoint() so it'll enter the
        // while loop again
        points = GetPoint();
    }
}

The problem is that the point counter isn't increased when a point item is collected, so you have to do it manually, which i cannot because i cannot get when they are picked up...

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #113 on: December 01, 2011, 05:04:19 PM »
I'm all out of ideas then. I'd have to actually experiment with ph3 to be of any help and I don't really feel like doing that... Anyone else wanna take a stab at this?
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

NonexistentFlower

  • 悪ノ花(君)
  • Oh... And... I'm a boy.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #114 on: December 03, 2011, 01:45:58 PM »
You should use
ObjMove_AddPatternA1 ,ObjMove_AddPatternA2, ObjMove_AddPatternA3 or ObjMove_AddPatternA4
Since these functions only allow you to change speed/direction/other crap after a certain period, how could you make bullets change their properties once a certain condition is fulfilled, (barring doing some calculations, of course) such as bullets bouncing off walls?
~TH
......I said nothing.

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #115 on: December 04, 2011, 02:03:30 AM »
The new engine seems much more cooler ( Infact I changed the default screen to Undefined Fantastic Object  ). Finally something new I can do without fucking include functions for the CTC shot sheet. YES!
" Borders are Borders. They were meant to be manipulated and mistreated. "

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #116 on: December 04, 2011, 02:36:13 AM »
Since these functions only allow you to change speed/direction/other crap after a certain period, how could you make bullets change their properties once a certain condition is fulfilled, (barring doing some calculations, of course) such as bullets bouncing off walls?
Object bullets, or math to calculate the frames needed for the effect to happen :V

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #117 on: December 09, 2011, 11:08:05 AM »
Well if you're just interested in bouncing off walls one, you can also just shoot the symmetric image of your bullet.

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #118 on: December 09, 2011, 12:35:38 PM »
Does anyone know all the functions of ph3? I'm making a function replace for 0.12m so can someone provide with the most functions or a link to all the functions?
" Borders are Borders. They were meant to be manipulated and mistreated. "

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #119 on: December 09, 2011, 12:58:40 PM »
Does anyone know all the functions of ph3? I'm making a function replace for 0.12m so can someone provide with the most functions or a link to all the functions?

The wiki has most of them described: http://dmf.shrinemaiden.org/wiki/index.php?title=Functions_(ph3)