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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #960 on: January 02, 2016, 07:51:16 PM »
((9
I know thisss
I mean I need to change the timer WHILE spellcard is active
like,suddenly change the timer
Well, you didn't exactly say that in your original post.

I don't think you can even freeze / re-edit the timer.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #961 on: January 02, 2016, 09:12:13 PM »
Well, you didn't exactly say that in your original post.

I don't think you can even freeze / re-edit the timer.

Instead of using the real timer, why not just avoid setting the default timer ? It will default to infinite time remaining, and you can then use your own custom timer with multiple variables. You will have to set a "spellcard get" score manually however.

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #962 on: January 02, 2016, 09:30:44 PM »
Instead of using the real timer, why not just avoid setting the default timer ? It will default to infinite time remaining, and you can then use your own custom timer with multiple variables. You will have to set a "spellcard get" score manually however.

Eeeeeh?Custom timers?
jeez
never thought of that
« Last Edit: January 02, 2016, 09:37:39 PM by BobTheTanuki »

Shadow

  • Forever waiting for tomorrow
  • ...
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #963 on: January 03, 2016, 02:07:54 AM »
You can in fact edit the timer via ObjEnemyBossScene_SetSpellTimer. I've only used it to freeze the timer, however, so I don't know if it'll be able to accomplish what you want, but theoretically it should be able to suit your needs.

EDIT: Seems like you've tried using this before, so I'll clarify. The function's parameters are 1. the object ID of the Boss Scene, and 2. the timer itself, in frames. You can use GetEnemyBossSceneObjectID to retrieve the Boss Scene ID, so changing the timer from 80 seconds to 40 seconds is just a matter of calling ObjEnemyBossScene_SetSpellTimer(GetEnemyBossSceneObjectID,60*40).
« Last Edit: January 03, 2016, 02:22:30 AM by Shadow »

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #964 on: January 03, 2016, 02:21:47 AM »
1) It's a boss scene function, so the first parameter has to be the scene object, not the enemy object
2) The time given is in frames, not seconds

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

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #965 on: January 03, 2016, 07:57:51 AM »
Thank you all!
I've got it
Now it's working -u-

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #966 on: January 03, 2016, 06:53:40 PM »
Quote
Well sometimes people create their own by using Object Lasers and build it off from there , or another option is a trail of (ADD) bullets instead which is much harder and could potentially lag, it's just a matter of imagination i guess
I see almost how to do with bullets but with Object Lasers? How can I do this (without using actual CreateCurveLaserA1)?

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 #967 on: January 03, 2016, 07:22:12 PM »
I see almost how to do with bullets but with Object Lasers? How can I do this (without using actual CreateCurveLaserA1)?
Doing it with lasers , is just the same as trailing bullets but the "tip" is a small object curvy laser that leaves more lasers making it seems like a curvy laser but its actually just trailing, you can make the tip and the trail as an object if you really dont want to use default functions
いつもニコニコあなたの隣に這いよる!生放送!は好き。月です~す。略してニコニャル
Learned how to use a custom shotsheet : 12/28/13 *clapclapclap*
東方謎佚光 ~ Dimensional Light Abscence Work In Progress Touhou Fangame

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #968 on: January 03, 2016, 07:57:26 PM »
Okay. I never thought I can use lasers (loose lasers i guess?). But it don't cause more fps drops with long lasers than with bullet trail?

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 #969 on: January 04, 2016, 12:37:26 AM »
Okay. I never thought I can use lasers (loose lasers i guess?). But it don't cause more fps drops with long lasers than with bullet trail?
A laser leaving a trail of lasers that are like 10 in length Shouldn't cause fps drops , just try to make sure those trails get deleted afterwards
いつもニコニコあなたの隣に這いよる!生放送!は好き。月です~す。略してニコニャル
Learned how to use a custom shotsheet : 12/28/13 *clapclapclap*
東方謎佚光 ~ Dimensional Light Abscence Work In Progress Touhou Fangame

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #970 on: January 06, 2016, 11:57:15 PM »
Just curious: how to let the player start a replay at an arbitrary stage (like all of the official Touhou games from EoSD, as well as PoIB)? Obviously, that would require saving stats for each stage, but what else, then, to get to the keypresses recorded at the correct stage? Do they simply discard the first n frames of the file?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #971 on: January 07, 2016, 05:47:26 AM »
Danmakufu has that feature built in. Use SetStageIndex() and load the correct stage. The Score, Graze, etc... is already recorded per stage

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #972 on: January 07, 2016, 06:24:30 AM »
Danmakufu has that feature built in. Use SetStageIndex() and load the correct stage. The Score, Graze, etc... is already recorded per stage

CommonData is recorded as well, right?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #973 on: January 07, 2016, 07:42:43 AM »
Use the Load/SaveAreaCommonDataToReplay functions

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #974 on: January 07, 2016, 01:20:38 PM »
Hello you guys
I wonder how should I make a statement for collision of two obj bullets if they are in different tasks,like :

Code: [Select]
task bullet1{
let obj1=.....
stuff;
}


task bullet2{
let obj2=.....
stuff;
}


Just danmakufu  doesn't see one of these IDs
I hope you understand :V
Or how should I make an bullet ID that I can use in other tasks?

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #975 on: January 07, 2016, 01:59:55 PM »
Before you get into implementing this, what exactly is the pattern you're trying to make with this?

How complicated it gets comes down to whether one set of objects, both, or neither, will be changing (i.e. adding more or deleting some) throughout the pattern. If you have one set of objects where they just maybe move around without leaving the screen and the other is a bunch of bullets that are fired and then deleted, then that's easier than having two different sets of bullets where both of them are very dynamic and changing all the time.

In any case, here's the general outline for something like this:

Code: [Select]
function ObjectA(){
    let objA = ObjSomething_Create();
    // initialize objA
    task DoStuffA(objA){
        while(!Obj_IsDeleted(objA)){
            // running object behaviour
            yield;
        }
    }
    DoStuffA(objA);
    return objA;
}

function ObjectB(){
    let objB = ObjSomething_Create();
    // initialize objB
    task DoStuffB(objB){
        while(!Obj_IsDeleted(objB)){
            // running object behaviour
            yield;
        }
    }
    DoStuffB(objB);
    return objB;
}

let objA1 = ObjectA();  // makes an A object and puts its object ID into this variable
let objB1 = ObjectB();  // makes a B object and puts its object ID into this variable

// do things with both objA1 and objB1

If you have multiple instances of objA and objB (which is likely) you would make an array for each and add to the array for new objects, like

Code: [Select]
let listA = [];
let listB = [];
loop(m){
    listA = listA ~ [ObjectA()];
}
loop(n){
    listB = listB ~ [ObjectB()];
}

And then work with those arrays. However when you might want to add and delete stuff from the arrays a lot, that's where things get complicated, which is why it's important to know if your problem can be simplified somewhat (which is pretty likely).

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

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #976 on: January 07, 2016, 02:08:41 PM »
Well,I have rings of bullets(just a ring fired several time) and after some time there is another ring of different bullets
And all I want to do is :  these different bullets gonna do some stuff to the first ones when they go near them :derp:

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #977 on: January 08, 2016, 02:03:32 PM »
Here's the code I'm using:  http://pastebin.com/rjGhW2aX

I'm new to Danmakufu. I'm using Sparen's tutorial (http://sparen.github.io/ph3tutorials/ph3u1l8a.html), but on the part of replicating Eternal Meek, something seems wrong. For all other scripts it works fine, however, when I try to replicate Eternal Meek, it says GetCenterX is undefined, same for any other task and function. It works for every other script, but for this one it doesn't. I tried putting the tasks and functions on the top of the script and now there's no error about stuff not being defined, but now it says there should be a } before wait(120);. However, if I add that, it'll point to MainTask's end } and say it's unable to be interpreted.

Can anyone tell me if I'm doing something wrong and how I should fix it? Yes, I did check if everything is spelled right; yes, I did check if there's the same amounts of {'s and }'s. And no, those errors don't seem to be happening on any other scripts.

Drake

  • *
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #978 on: January 08, 2016, 02:23:00 PM »
Well, check the line before that wait(120) again. It's line 19.

In the future, these sorts of one-off questions generally go in the stickied ph3 Q&A threads.

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 #979 on: January 08, 2016, 03:02:23 PM »
Well, check the line before that wait(120) again. It's line 19.

In the future, these sorts of one-off questions generally go in the stickied ph3 Q&A threads.

I'm sorry, I didn't notice I forgot the ; at the end of that line. Anyways, fixed now.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #980 on: January 08, 2016, 07:26:14 PM »
Quote from: Lunar
A laser leaving a trail of lasers that are like 10 in length Shouldn't cause fps drops , just try to make sure those trails get deleted afterwards
You use LooseLasers or StraightLasers to make the trail?
I try with LooseLasers but they need a speed or they don't have any sprite. But with speed... I don't know how I can make a decent trail.
With StraightLasers It's better but I get stripped and blur effect at the end of the trail.
Anyway, I can't get a curved laser close to ZUN's one :(.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #981 on: January 11, 2016, 08:05:25 PM »
Good day.
Sorry for the stupid question.
But how could I indicate in #Player[ ? ] more than one player?

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #982 on: January 11, 2016, 08:55:56 PM »
#Player["player1_path", "player2_path", "etc"].

Juste use a , between every path ;).

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #983 on: January 12, 2016, 06:48:47 PM »
#Player["player1_path", "player2_path", "etc"].

Juste use a , between every path ;).

Thanks! It's working!  :)

Miplouf Saigyouki

  • Multichomatic Beast
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #984 on: January 14, 2016, 08:20:25 PM »
Hello, i'd like to know how to use
Code: [Select]
#ID[YourScriptIDHere]in the header, and know if I can use it to trigger certain events in stage,like:
Code: [Select]
if(GetOwnScriptID()=="MIDBOSS"){ stuff;}
I've been trying to do so, but without success.Can somebody help?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #985 on: January 14, 2016, 11:37:34 PM »
Hello, i'd like to know how to use
Code: [Select]
#ID[YourScriptIDHere]in the header, and know if I can use it to trigger certain events in stage,like:
Code: [Select]
if(GetOwnScriptID()=="MIDBOSS"){ stuff;}
I've been trying to do so, but without success.Can somebody help?

#ID is meant for player scripts, I believe. It takes the form of a user-defined string.

GetOwnScriptID() is a function that gets the internal identification code for the current script.

If you want to have events in-stage, please use @Event and NotifyEvent (http://dmf.shrinemaiden.org/wiki/Script_Functions#NotifyEvent) in conjunction with EV_USER.

Miransu's EV_USER guide: http://dmf.shrinemaiden.org/wiki/Miransu%27s_EV_USER_Guide

For all the script functions, please refer to http://dmf.shrinemaiden.org/wiki/Script_Functions

Miplouf Saigyouki

  • Multichomatic Beast
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #986 on: January 15, 2016, 09:34:50 PM »
Thanks a lot!

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #987 on: January 23, 2016, 09:32:36 PM »
hello im pretty fresh here  :V

I tried figuring this out for such a long time, to no avail: How do I make bullets spawn in a circle (or any other pattern) continuously, similarly to this?
This definitely probably is a noob question, but that's because I'm quite new to Danmakufu.
Lunatic 1CCs: PCB, IN, PoFV, HSiFS
Extra: All except PC-98.

Oh hey look I can do DNH scrips.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #988 on: January 24, 2016, 12:30:39 AM »
hello im pretty fresh here  :V

I tried figuring this out for such a long time, to no avail: How do I make bullets spawn in a circle (or any other pattern) continuously, similarly to this?
This definitely probably is a noob question, but that's because I'm quite new to Danmakufu.

If you want a pattern to fire continuously, use a while loop where the while condition is whether or not the boss has more than 0 HP. Make sure you have at least one yield; in the while loop, and a yield in @MainLoop.

As for the circle, use standard trigonometry to fire the bullets. For example, if I want a circle with 5 bullets in it and a radius of 60, I would do
Code: [Select]
loop(5){
    CreateShotA1(ObjMove_GetX(objBoss) + 60*cos(angleT), ObjMove_GetY(objBoss) + 60*sin(angleT), 1, angleT, 1, 0);
    angleT += 360/5;
}

where angleT is the starting angle to fire at.

Re: ※ Dnh Q&A/Problem thread II ※ for Danmakufu ph3 .1 preX(ry
« Reply #989 on: January 24, 2016, 10:09:44 AM »
If you want a pattern to fire continuously, use a while loop where the while condition is whether or not the boss has more than 0 HP. Make sure you have at least one yield; in the while loop, and a yield in @MainLoop.

As for the circle, use standard trigonometry to fire the bullets. For example, if I want a circle with 5 bullets in it and a radius of 60, I would do
Code: [Select]
loop(5){
    CreateShotA1(ObjMove_GetX(objBoss) + 60*cos(angleT), ObjMove_GetY(objBoss) + 60*sin(angleT), 1, angleT, 1, 0);
    angleT += 360/5;
}

where angleT is the starting angle to fire at.

But that would make all the bullets spawn at the same time.
What I'm trying to do is spawn the bullets one at a time around the boss, just like in Satellite Himawari.


I'm thinking it might work like this, but I could be wrong:

Code: [Select]
CreateShotA1(x, y, 3, 60, 1, 10) //x and y are values increasing or decreasing every frame, depending on the timing
If I time it right, could I potentially make a circle one bullet at a time?
Lunatic 1CCs: PCB, IN, PoFV, HSiFS
Extra: All except PC-98.

Oh hey look I can do DNH scrips.