Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 469031 times)

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1590 on: December 03, 2018, 08:54:23 AM »
The lasers are also player shots, so if you forbid player shots they will not fire. Why are you trying to forbid player shots? Do you just want to stop the player from firing while the spell card is active?

If this is what you want, you can add if(!IsPlayerSpellActive()) as a condition to fire your main player shots. You should also add some kind of wait before you delete the spell manager object, since that's the signal to say the spell is finished.

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

Tad Marx Barba

  • Mastermind Behind the Mirror
  • Struggling with my boring life =w=
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1591 on: December 03, 2018, 07:22:48 PM »
The lasers are also player shots, so if you forbid player shots they will not fire. Why are you trying to forbid player shots? Do you just want to stop the player from firing while the spell card is active?

Yes, I'm trying to forbid the player shots from firing during the spellcard.

If this is what you want, you can add if(!IsPlayerSpellActive()) as a condition to fire your main player shots. You should also add some kind of wait before you delete the spell manager object, since that's the signal to say the spell is finished.
Is that so easy to do? (sorry I'm new in creating player scripts, I want create MY OWN PLAYER SCRIPTS in order to quit using the player scripts that others made, I'm not comfortable using scripts that aren't mine)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1592 on: December 03, 2018, 08:21:27 PM »
Is that so easy to do? (sorry I'm new in creating player scripts, I want create MY OWN PLAYER SCRIPTS in order to quit using the player scripts that others made, I'm not comfortable using scripts that aren't mine)
If that is the case, then it is highly suggested to read and follow tutorials so you will be making your own player scripts.

Tad Marx Barba

  • Mastermind Behind the Mirror
  • Struggling with my boring life =w=
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1593 on: December 03, 2018, 10:25:33 PM »
If that is the case, then it is highly suggested to read and follow tutorials so you will be making your own player scripts.
Where I search that tutorials? I need to improve my skills in creating player scripts!  :D :D :D :D

But I still have that question, How to use IsPlayerSpellActive ?
« Last Edit: December 03, 2018, 10:30:21 PM by Tad Marx Barba »

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1594 on: December 04, 2018, 02:07:56 AM »
In your foxShot task, you would add the condition before firing your player shots:

Code: [Select]
while(!Obj_IsDeleted(ID))
{
if(!IsPlayerSpellActive){
if(GetVirtualKeyState(VK_SHOT) == KEY_PUSH||[...]
[...]
}
wait(5);
}

If you only change this, it will seem like it doesn't do anything. This is because in your spell you delete the spell manager object right after you fire all the lasers:

Code: [Select]
task Bloody_Laser(frame, num, amnt)
{
[...]
// loop firing lasers
OSCURECER_PANTALLA(GetPlayerX(), GetPlayerY(), 40, [50, 110, 255], 405);
Blink;
Obj_Delete(man);
}

Which ends the spell after only a couple frames, even though the effects and lasers will still exist. You can see this if you try spamming bombs; you will get three of them overlapping at once.

If you add a delay before you delete the spell manager object, to mark where the spell should end, it will fix this issue:

Code: [Select]
task Bloody_Laser(frame, num, amnt)
{
[...]
// loop firing lasers
OSCURECER_PANTALLA(GetPlayerX(), GetPlayerY(), 40, [50, 110, 255], 405);
Blink;
wait(300);
Obj_Delete(man);
}

These two changes will be enough to stop the player from firing during the spell.

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

Tad Marx Barba

  • Mastermind Behind the Mirror
  • Struggling with my boring life =w=
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1595 on: December 04, 2018, 03:14:08 AM »
So much Thanks Drake! I still learning how to do somethings in player script, 'cause I'm new in that

After take a bath, I couldn't stop thinking what was I've to do in that, I thought that putting the if conditional then the while loop of the player shot could be a way to correct the problem with the line
Code: [Select]
SetForbidPlayerShot(true);
But I couldn't thought that I have to put a wait before the spell manager erased. Thank you very much, Drake!  :blush: ::) ::)

I'll credit you for your help!

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1596 on: December 05, 2018, 12:24:55 PM »
I've noticed that when a text object inserts a line break in a string due to it hitting max length, the line break can be added in the middle of a word. Is there a way to stop this behaviour, short of manually specifying all line breaks?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1597 on: December 05, 2018, 02:39:26 PM »
I've noticed that when a text object inserts a line break in a string due to it hitting max length, the line break can be added in the middle of a word. Is there a way to stop this behaviour, short of manually specifying all line breaks?

I wrote a library for this.

https://github.com/Sparen/Sparen-DNH-STL/blob/master/lib_autoformat.dnh

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1598 on: December 05, 2018, 09:24:00 PM »
Hello everyone, this is my first post here and I really hope that someone can help me :)

So! Recently I got into Danmakufu, more than once I tried to script in the past, but I always gave up until now. I already created a Spell Card for Yuyuko, Ringo and Sagume, just as a practice. Now I'm creating another one for a random character, but there is something that is bugging me:

Basically the Spell Card is about many blue and red bullets that go towards the upper part of the screen (in a "Geyser style") and when they reach a random section of the upper part they are supposed to aim at the player (or a random section where the player is) as if there was no gravity and with a different graphic. I've been able to recreate the first part of the Spell, but I really can't get past the second one.

I don't know how to change the bullets graphic and their direction.
I tried Booleans as well, but maybe I typed something wrong since I still have to understand them?
Anyway I hope someone can help. If you need the script, just ask and I'll send it privately.
And sorry for my bad English!

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1599 on: December 07, 2018, 02:33:41 PM »
Basically the Spell Card is about many blue and red bullets that go towards the upper part of the screen (in a "Geyser style") and when they reach a random section of the upper part they are supposed to aim at the player (or a random section where the player is) as if there was no gravity and with a different graphic. I've been able to recreate the first part of the Spell, but I really can't get past the second one.
Have you tried using "ObjMove_AddPatternA3"? You can use it to change the bullets' angle, speed, etc., and the bullet graphic.
If you want to change their direction in a random section on the upper part, you can try to make the code that's going to change the bullets' way/graphic get executed when they reach a certain y coordinate (for example 60), and make the code wait for random time (for example 20-60 frames).

AKA something like this:
Code: [Select]
//Shooting bullet(s), assuming they're defined to an object called "bullet"

//. . .

TBulletChange(bullet);

//. .​ .

task TBulletChange(obj){
if(ObjMove_GetY(obj) == 60){
ObjMove_AddPatternA3(obj, rand(25, 60), NO_CHANGE, GetAngletoPlayer(obj), NO_CHANGE, NO_CHANGE, ObjMove_GetSpeed(obj), "Bullet graphic ID you want to change into");
}
}
And I doubt it's the easiest way to do it, I just do it like this myself.
And sorry for my bad English!
Ah shush, your English isn't bad. ^-^

Note: If you're using CreateShotB2 to create bullets, the code above wouldn't work, and you need to find a different way to make bullets face to the player, which I don't know, sorry.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1600 on: December 08, 2018, 01:15:34 AM »
Have you tried using "ObjMove_AddPatternA3"? You can use it to change the bullets' angle, speed, etc., and the bullet graphic.
If you want to change their direction in a random section on the upper part, you can try to make the code that's going to change the bullets' way/graphic get executed when they reach a certain y coordinate (for example 60), and make the code wait for random time (for example 20-60 frames).

AKA something like this:
Code: [Select]
//Shooting bullet(s), assuming they're defined to an object called "bullet"

//. . .

TBulletChange(bullet);

//. .​ .

task TBulletChange(obj){
if(ObjMove_GetY(obj) == 60){
ObjMove_AddPatternA3(obj, rand(25, 60), NO_CHANGE, GetAngletoPlayer(obj), NO_CHANGE, NO_CHANGE, ObjMove_GetSpeed(obj), "Bullet graphic ID you want to change into");
}
}
And I doubt it's the easiest way to do it, I just do it like this myself.Ah shush, your English isn't bad. ^-^

Note: If you're using CreateShotB2 to create bullets, the code above wouldn't work, and you need to find a different way to make bullets face to the player, which I don't know, sorry.


Ahhh thank you a lot, after a while I managed to do it and I'm quite pleased with the effect despite the difficulty ahah. I used AddPatternA3, but instead of creating another task I put it in the task with the current fired bullet so that after a couple frame they could have changed their graphic and angolation :D

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1601 on: December 10, 2018, 11:47:16 AM »
What are the differences between Common Data and Area Common Data functions?

The documentation seems to imply that Area Common Data is a case of Common Data where you manually assign the location of the memory (indexed array?). If so, where is the regular Common Data stored?

And from a practical standpoint, which is easier/faster/safer to use?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1602 on: December 10, 2018, 12:12:59 PM »
Common Data Areas are groups of Common Data. If you have a lot of Common Data for related things (as would probably pop up in a large project), you might want to put them into areas to categorize them. The CommonData functions are a shortcut for the special case where the area name is "" (empty string), which is automatically created by default.

Fundamentally, a Common Data table is a dictionary structure, where you have strings as keys that map to arbitrary values. The Common Data Area table is also a dictionary, where strings (the area names) map to different Common Data tables.

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1603 on: December 11, 2018, 05:35:34 AM »
Additionally, CommonDataArea can be saved to a file and thus become "persistent" data. CommonData is cleared once the game ends. Useful if you want to store progress (spellcard history etc.) / configuration settings and such of a player


Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1604 on: December 11, 2018, 09:29:49 AM »
Additionally, CommonDataArea can be saved to a file and thus become "persistent" data. CommonData is cleared once the game ends. Useful if you want to store progress (spellcard history etc.) / configuration settings and such of a player

Is this to say that the default CommonData area "" cannot be converted to persistent memory?
I also take it that this method of storing progress is recommended above the use of writing to file objects with ObjFile_OpenNW?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1605 on: December 11, 2018, 02:31:14 PM »
I discussed this with Drake on IRC. To be honest, I am not exactly sure what happens if you call SaveCommonDataArea without providing a value for the "area". The guess is that it will generate a file containing the commondata values. But I have never tried this thus one way to find out for you.

- Write a script that creates a CommonData with a key value pair and save it with empty string value as you wrote.
- Also write somewhere where the commondata is loaded and the data is read.
- Close the script/game
- Reboot game and see what happens.[/li][/list]

Do report your findings, I would say

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1606 on: December 12, 2018, 08:25:41 AM »
    - Write a script that creates a CommonData with a key value pair and save it with empty string value as you wrote.
    - Also write somewhere where the commondata is loaded and the data is read.
    - Close the script/game
    - Reboot game and see what happens.[/li][/list]

    Do report your findings, I would say

    It is as you say: A file "data/Filename_common_.dat" is created with the values of the default common data area are created.
    However, I've had inconsistent results when I try to load this data file using LoadCommonDataAreaA1() with an empty string parameter - The function sometimes fails.
    More consistent so far, I've found, is to use LoadCommonDataAreaA2(), and to load into a different CommonData area, which seems to work fine.

    I do feel like the latter method seems to be a roundabout way of storing data, which could be accomplished in fashion that's easier to read by using a Common data area with a consistent key. I might see this as advantageous if using a default CommonData area has less overhead than a custom one. Would that be true?

    On a side note, using SaveCommonDataAreaA2() on a previously made data file instead of letting one be generated automatically also seems to work fine.

    Drake

    • *
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1607 on: December 12, 2018, 08:30:46 AM »
    If the data is important enough to save to file it should probably be in its own area and not the default one.

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

    Tad Marx Barba

    • Mastermind Behind the Mirror
    • Struggling with my boring life =w=
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1608 on: December 15, 2018, 11:04:04 PM »
    Hi Guys! I need to do a gravity bullet vortex, how I could do that?  :smokedcheese:

    Sparen

    • Danmakufu Artist
    • Git ready, git set, PUUSH!
      • AFCDTech
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1609 on: December 16, 2018, 01:36:55 AM »
    Hi Guys! I need to do a gravity bullet vortex, how I could do that?  :smokedcheese:

    Please describe what a gravity bullet vortex is first :)

    Once you have described what you're trying to do in detail, it will be much easier to understand what you want to make.

    Tad Marx Barba

    • Mastermind Behind the Mirror
    • Struggling with my boring life =w=
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1610 on: December 16, 2018, 10:48:00 PM »
    Please describe what a gravity bullet vortex is first :)

    The bullets are spawned from a certain point upwards, and then it fells simulating a whirlpool effect or something

    HumanReploidJP

    • The Scripter with Something of Common Sense
    • "Start the life of an idol! Let's get STAR~ted!"
      • HumanReploidJP's Youtube Channel
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1611 on: December 28, 2018, 06:28:46 AM »
    So I tried creating my own simple dialogue system like the touhou games from 6-11.

    As I put my variable 'g_obj_boss' for local format, as follows:

    Stage part:

    -At Plural Script 1, I set the boss variable to an object enemy boss.
    when the boss health reaches to 0, the boss's position automatically sets to 0-0 coordinates as it proceeds to the next plural part (the Dialogue) where I created the variable boss as enemy.

    -After the dialogue, the boss object's position automatically resets to 0-0 coordinates as it proceeds to the next plural part (the boss part). Still I'm running out of time before New Year...

    Anyone can help explain this if you watch it and read it. Please Respond. ty.
    ===========================================================================================================================================
    Edit: I assume why. As I misunderstood...

    So I was creating a system for the dialogue event, and I might've ran into it so... here's what I did:

    This is what the code for the stage looks like:
    Code: [Select]
    task TStage
    {
    wait(60);

    StartScript(idScriptA);SetAreaCommonData("System", "BossInspiration", r[3]);
    while(!IsCloseScript(idScriptA))   //Run plural-stg00e-mid.dnh - midboss event
    {
    yield;
    }

    StartScript(idScriptB);SetAreaCommonData("System", "BossInspiration", r[3]);
    while(!IsCloseScript(idScriptB))   //Run plural-stg00e-talk.dnh - the dialogue event
    {
    yield;
    }

    wait(240);
    CloseStgScene();
    }

    The idScriptA, which is the Midboss Event, as shown in the code above. I put the codes to initialize the boss to appear:

    This is the variable for the boss object for format in (lib_variables_boss.dnh):

    Code: [Select]
    let g_obj_boss;    //This is the variable to set to Enemy Boss in scripts.
    Code: [Select]
    @Initialize{
    SetShotAutoDeleteClip(480,480,480,480);
    g_obj_boss = ObjEnemy_Create(OBJ_ENEMY_BOSS);   //The object as an Enemy Boss
    ObjEnemy_Regist(g_obj_boss);
    //Init_Boss_Aura(g_obj_boss,32,176,255,32,64,255,1);
    Render_Boss_Anim(g_obj_boss,anim_HBKT);ObjEnemy_SetDamageRate(g_obj_boss, 0, 0);
            ObjMove_SetDestAtFrame(g_obj_boss, trunc(GetCenterX()+rand(-96,96)), trunc((GetCenterY()/2)+rand(-16,16)), 30);   //The coordinates of the Boss Object

    StartSpell;
    init_phase1;

    TFinalize;
    }

    Then, the idScriptB, which is the Dialogue Event. I put the codes to initialize the boss to appear:

    Code: [Select]
    @Initialize{
    g_obj_boss = ObjEnemy_Create(OBJ_ENEMY);   //The object as an enemy during the dialogue. Still a boss.
    ObjEnemy_Regist(g_obj_boss);
    //Init_Boss_Aura(g_obj_boss,32,176,255,32,64,255,1);
    ObjMove_SetDestAtFrame(g_obj_boss, trunc(GetCenterX()), trunc((GetCenterY()/2)+rand(-16,16)), 60);    //The coordinates of the enemy object after the boss dies before the event dialogue.
    Render_Boss_Anim(g_obj_boss,anim_Hika);ObjEnemy_SetDamageRate(g_obj_boss, 0, 0);

    SetCommonData("event_dialogue",true);
    SetShotAutoDeleteClip(480,480,480,480);

    SetTalk;
    CheckEventDia;
    }

    @MainLoop{
    yield;
    }

    //Create Anything, heheh.
    task SetTalk
    {
    wait(90);
    DrawBorder;
    SetText_Simple(chartype[1],charcolor_ubkt[0],charcolor_ubkt[1],charcolor_ubkt[2],"My...");
    SetText_Simple(chartype[1],charcolor_ubkt[0],charcolor_ubkt[1],charcolor_ubkt[2],"I've been hardly noticed...");

    SetText_Simple(chartype[0],charcolor_nemuno[0],charcolor_nemuno[1],charcolor_nemuno[2],"Well, not a bad problem.");
            ... ... ...
            ...
    }

    The Main Problem for the object as an enemy boss, which last time I rushed out to explain, is the Coordinates of the Enemy Boss object.

    at idScriptA, the Coordinates for the boss at the start are (0,0) and the object will move to (GetCenterX(), ((GetCenterY()/2)+rand(-16,16)).

    Then, as the boss dies (TFinalize), the idScriptA is closed and idScriptB is next (Dialogue). This time, the coordinates for the Enemy Object are automatically (0,0) and the object will move to (GetCenterX(), ((GetCenterY()/2)+rand(-16,16)).

    Still... but why...?

    And if I'm not mistaken... Here's the video based on the coordination problem: https://www.youtube.com/watch?v=d9mNMiH1wx4

    Please respond immediately. ty. :X
    « Last Edit: December 29, 2018, 12:15:30 AM by HumanReploidJP »
    MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
    (Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)

    Sparen

    • Danmakufu Artist
    • Git ready, git set, PUUSH!
      • AFCDTech
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1612 on: December 28, 2018, 03:50:12 PM »
    So I tried creating my own simple dialogue system like the touhou games from 6-11.

    As I put my variable 'g_obj_boss' for local format, as follows:

    Stage part:

    -At Plural Script 1, I set the boss variable to an object enemy boss.
    when the boss health reaches to 0, the boss's position automatically sets to 0-0 coordinates as it proceeds to the next plural part (the Dialogue) where I created the variable boss as enemy.

    -After the dialogue, the boss object's position automatically resets to 0-0 coordinates as it proceeds to the next plural part (the boss part). Still I'm running out of time before New Year...

    Anyone can help explain this if you watch it and read it. Please Respond. ty.

    It is difficult to understand what your question/your problem is just by reading your description. Consider reading https://stackoverflow.com/help/mcve. tl;dr you haven't explained what your problem is, haven't stated what you actually *want* to happen, and haven't produced enough context/code to tell where each component is being called.

    Assuming that your issue is that the boss position is not being maintained between consecutive scripts:
    Ensure that communication between scripts is being done via Common Data. Setting the position of an enemy you will delete and recreate will not be sufficient for setting a position between different scripts. Refer to https://sparen.github.io/ph3tutorials/ph3u3l24.html

    Assuming that your issue is confusion between Boss Enemy Objects and Boss Scene Objects:
    Refer to https://sparen.github.io/ph3tutorials/ph3u2l12.html and https://sparen.github.io/ph3tutorials/ph3u3l23.html

    HumanReploidJP

    • The Scripter with Something of Common Sense
    • "Start the life of an idol! Let's get STAR~ted!"
      • HumanReploidJP's Youtube Channel
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1613 on: December 29, 2018, 12:17:06 AM »
    It is difficult to understand what your question/your problem is just by reading your description. Consider reading https://stackoverflow.com/help/mcve. tl;dr you haven't explained what your problem is, haven't stated what you actually *want* to happen, and haven't produced enough context/code to tell where each component is being called.

    Assuming that your issue is that the boss position is not being maintained between consecutive scripts:
    Ensure that communication between scripts is being done via Common Data. Setting the position of an enemy you will delete and recreate will not be sufficient for setting a position between different scripts. Refer to https://sparen.github.io/ph3tutorials/ph3u3l24.html

    Assuming that your issue is confusion between Boss Enemy Objects and Boss Scene Objects:
    Refer to https://sparen.github.io/ph3tutorials/ph3u2l12.html and https://sparen.github.io/ph3tutorials/ph3u3l23.html

    I assume why. As I misunderstood...

    So I was creating a system for the dialogue event, and I might've ran into it so... here's what I did:

    This is what the code for the stage looks like:
    Code: [Select]
    task TStage
    {
    wait(60);

    StartScript(idScriptA);SetAreaCommonData("System", "BossInspiration", r[3]);
    while(!IsCloseScript(idScriptA))   //Run plural-stg00e-mid.dnh - midboss event
    {
    yield;
    }

    StartScript(idScriptB);SetAreaCommonData("System", "BossInspiration", r[3]);
    while(!IsCloseScript(idScriptB))   //Run plural-stg00e-talk.dnh - the dialogue event
    {
    yield;
    }

    wait(240);
    CloseStgScene();
    }

    The idScriptA, which is the Midboss Event, as shown in the code above. I put the codes to initialize the boss to appear:

    This is the variable for the boss object for format in (lib_variables_boss.dnh):

    Code: [Select]
    let g_obj_boss;    //This is the variable to set to Enemy Boss in scripts.
    Code: [Select]
    @Initialize{
    SetShotAutoDeleteClip(480,480,480,480);
    g_obj_boss = ObjEnemy_Create(OBJ_ENEMY_BOSS);   //The object as an Enemy Boss
    ObjEnemy_Regist(g_obj_boss);
    //Init_Boss_Aura(g_obj_boss,32,176,255,32,64,255,1);
    Render_Boss_Anim(g_obj_boss,anim_HBKT);ObjEnemy_SetDamageRate(g_obj_boss, 0, 0);
            ObjMove_SetDestAtFrame(g_obj_boss, trunc(GetCenterX()+rand(-96,96)), trunc((GetCenterY()/2)+rand(-16,16)), 30);   //The coordinates of the Boss Object

    StartSpell;
    init_phase1;

    TFinalize;
    }

    Then, the idScriptB, which is the Dialogue Event. I put the codes to initialize the boss to appear:

    Code: [Select]
    @Initialize{
    g_obj_boss = ObjEnemy_Create(OBJ_ENEMY);   //The object as an enemy during the dialogue. Still a boss.
    ObjEnemy_Regist(g_obj_boss);
    //Init_Boss_Aura(g_obj_boss,32,176,255,32,64,255,1);
    ObjMove_SetDestAtFrame(g_obj_boss, trunc(GetCenterX()), trunc((GetCenterY()/2)+rand(-16,16)), 60);    //The coordinates of the enemy object after the boss dies before the event dialogue.
    Render_Boss_Anim(g_obj_boss,anim_Hika);ObjEnemy_SetDamageRate(g_obj_boss, 0, 0);

    SetCommonData("event_dialogue",true);
    SetShotAutoDeleteClip(480,480,480,480);

    SetTalk;
    CheckEventDia;
    }

    @MainLoop{
    yield;
    }

    //Create Anything, heheh.
    task SetTalk
    {
    wait(90);
    DrawBorder;
    SetText_Simple(chartype[1],charcolor_ubkt[0],charcolor_ubkt[1],charcolor_ubkt[2],"My...");
    SetText_Simple(chartype[1],charcolor_ubkt[0],charcolor_ubkt[1],charcolor_ubkt[2],"I've been hardly noticed...");

    SetText_Simple(chartype[0],charcolor_nemuno[0],charcolor_nemuno[1],charcolor_nemuno[2],"Well, not a bad problem.");
            ... ... ...
            ...
    }

    The Main Problem for the object as an enemy boss, which last time I rushed out to explain, is the Coordinates of the Enemy Boss object.

    at idScriptA, the Coordinates for the boss at the start are (0,0) and the object will move to (GetCenterX(), ((GetCenterY()/2)+rand(-16,16)).

    Then, as the boss dies (TFinalize), the idScriptA is closed and idScriptB is next (Dialogue). This time, the coordinates for the Enemy Object are automatically (0,0) and the object will move to (GetCenterX(), ((GetCenterY()/2)+rand(-16,16)).

    Still... but why...?

    And if I'm not mistaken... Here's the video based on the coordination problem: https://www.youtube.com/watch?v=d9mNMiH1wx4

    Please respond immediately. ty. :X
    MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
    (Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)

    Drake

    • *
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1614 on: December 29, 2018, 01:24:48 AM »
    It's because you're running this as two different plural scripts. Boss enemy objects aren't going to stay the same in different plural scripts; these are two different bosses. So naturally they're going to not share coordinates.

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

    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1615 on: January 06, 2019, 05:00:18 AM »
    I'm with a little doubt, I'm having this problem with the function DeleteShotAll() in @MainLoop (I'm following Sparen's ph3 Tutorial):

    Code: [Select]
    //This code goes on @MainLoop

    if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0)
    {
      Obj_Delete(objBoss);
      DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE));
      SetAutoDeleteObject(true);
      CloseScript(GetOwnScriptID());
      return;
    }

    When I run this, Danmakufu gives me an error message saying it should have a "}" at the DeleteShotAll() line. But why? If I comment the entire DeleteShotAll() line, it runs with no error, so it's no brace matching mistake. Also when I use the task method. I thought this was some property of the function, but it doesn't make any sense.

    Helepolis

    • Charisma!
    • *
    • O-ojousama!?
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1616 on: January 06, 2019, 07:17:42 AM »
    I'm with a little doubt, I'm having this problem with the function DeleteShotAll() in @MainLoop (I'm following Sparen's ph3 Tutorial):

    Code: [Select]
    //This code goes on @MainLoop

    if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0)
    {
      Obj_Delete(objBoss);
      DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE));
      SetAutoDeleteObject(true);
      CloseScript(GetOwnScriptID());
      return;
    }

    When I run this, Danmakufu gives me an error message saying it should have a "}" at the DeleteShotAll() line. But why? If I comment the entire DeleteShotAll() line, it runs with no error, so it's no brace matching mistake. Also when I use the task method. I thought this was some property of the function, but it doesn't make any sense.
    You're closing DeleteShotAll with two parentheses.

    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1617 on: January 06, 2019, 08:22:16 AM »
    You're closing DeleteShotAll with two parentheses.

    Oh... that explains it. God, that was awful, I was so precautious about the braces I forgot completely of the parenthesis. I hope nobody would commit this kind of error again.
    « Last Edit: January 09, 2019, 01:00:36 AM by KDOXG »

    Helepolis

    • Charisma!
    • *
    • O-ojousama!?
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1618 on: January 06, 2019, 07:05:18 PM »
    Oh... that explains it. God, that was awful, I was so precautious about the braces I forgot completely of the parenthesis -_- I hope nobody would commit this kind of error.
    While the actual error description is vague and could come over as misleading, the line number usually tells the truth. There are a few rare conditions I ran into where the line number would trick the reader.

    Anyway, keep in mind for the future that if it points at a function/line number, your error is most of the time located there. (misspelling, misplaced parentheses, brackets, curly braces, case sensitive, missing or misplaced semicolon etc)
    « Last Edit: January 06, 2019, 07:26:44 PM by Helepolis »

    Kinedyme

    • Dream Magic - Duplex Spark!
    Re: ※ Danmakufu Q&A/Problem thread 3 ※
    « Reply #1619 on: January 07, 2019, 12:07:05 PM »
    I see that some scripts use .txt files and some use .dnh files.
    Is there a difference, other than personal preference?