Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 206547 times)

Uzumaki_tenma

  • JAOOOOOOOOO!!!!!!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #810 on: February 16, 2011, 05:40:09 PM »
That's the effect of RaiseError. So yeah, comment it out / Delete it.
And in doing so, the programcloses putting it found a problem (i'm such a pain, right?), now what happens!?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #811 on: February 17, 2011, 11:14:58 AM »
Quote
@Initialize{
   SetLife(1);
   SetDamageRate(1,1);
   LoadGraphic(Boss);
   SetGraphicRect(0,0,63,93);
   SetX(GetClipMaxX-50);
   SetY(-110);
   CollectItems;
   RaiseError(GetPlayerScriptName, "Sanae A");

   SetEnemyMarker(true);
   SetMovePositionHermite(cx,120,-90,290,0,0,100);

   if(GetPlayerScriptName=="REIMU"){
      CreateEventFromScript("Reimu");
   
   }else if(GetPlayerScriptName=="MARISA"){
      CreateEventFromScript("Marisa");

   }else if(GetPlayerScriptName=="Sanae A"){
      CreateEventFromScript("Sanae");
   }   

}

now what happens!?

Whoa you can do that ?!  :3
What is going to happen ?

anyways, I saw this on
http://dmf.shrinemaiden.org/wiki/index.php?title=Object_Control_Functions#Collision_Obj_Obj
Quote
Obj_SetCollisionToObject

2 Parameters
    1) object ID
    2) collision detection setting
        true : performed
        false: not performed

Set whether or not collision detection with other objects is performed. The collision detection can be performed by Collision_Obj_Obj.

(Youmu's bubble cutting blade comes to mind)
How do I use this  :3 Collision_Obj_Obj. I use to saw a sample script somewhere but I deleted it  :/
I don't think I recognize this in the tutorials either. Or did I misread ?
Hey There !

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #812 on: February 17, 2011, 07:56:15 PM »
Youmu's blade takes a giant rectangle of bullets if(object bullet is inside this fucking rectangle){explode;} ; it doesn't even bother with object collision. In this case, neither should you :V

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

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #813 on: February 18, 2011, 02:05:10 AM »
How do I call and shot a bullet from an external shot data?  (In my Case, Expanded ShotData ny Helepolis)

Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #814 on: February 18, 2011, 03:53:57 AM »
How do I call and shot a bullet from an external shot data?  (In my Case, Expanded ShotData ny Helepolis)

Do you mean you want to know how to create a shot replace script, or do you want to know how to create a bullet from said shot script?
If the latter, you just use the ID number of said bullet in whatever CreateShot function.

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #815 on: February 18, 2011, 05:00:24 AM »
Hmmm... but what about the SetShotData? In the Graphic argument, it seems that overrides the shot loaded...

I've loaded the Shot Data in Initialize, and Danmakufu shows no signs of crash, as if it ingores the information (and I check and I didn't ignore the line using the //)
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Schezo

  • en-counse
Re: Danmakufu Q&A/Problem thread number 4
« Reply #816 on: February 18, 2011, 05:12:12 AM »
You aren't supposed to load the shot sheet in the initialize, you should be calling it like a variable.

Code: [Select]
script_enemy_main {

LoadUserShotData(GetCurrentScriptDirectory ~ "andsoon");

@Initialize {

Then you should be able to call the numbers in the create whatevers.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #817 on: February 18, 2011, 10:07:11 AM »
Youmu's blade takes a giant rectangle of bullets if(object bullet is inside this fucking rectangle){explode;} ; it doesn't even bother with object collision. In this case, neither should you :V

Hnnnggggg  :getdown:

EDIT :
I'm stuck again, how do you do that  :( ^^^^
Also , how do you make things respond when it is being attacked by player ?

Quote
How do I call and shot a bullet from an external shot data?  (In my Case, Expanded ShotData ny Helepolis)

Maybe I can try to help too  :3
Let's say I'm using Supershot (an external shot data), and so there will be the shot data place thingy and the picture of the Shotdata.


Then I make a variable like that v

Code: [Select]
let SupaShot = GetCurrentScriptDirectory~".\Supershot.txt";
and then I load the supershot in @Initialize

Code: [Select]
   @Initialize{
LoadUserShotData(SupaShot);
}

That's all to it, don't forget to look at the numbers inside the shot data that should tell you what number will give you what graphic. And also, you can put the external shot data into your lib (library) so you can call it even if the external shot isn't in your folder, but your script path would be (in this case) like this instead.

Code: [Select]
let SupaShot = Some path that connects to your lib folder ~".\Supershot.txt";
« Last Edit: February 19, 2011, 09:35:27 AM by Foremoster »
Hey There !

KuraiShoka

  • Now son, don't touch that cactus...
  • Son, I Am Dissapoint
Re: Danmakufu Q&A/Problem thread number 4
« Reply #818 on: February 20, 2011, 03:39:39 AM »
Hnnnggggg  :getdown:

EDIT :
I'm stuck again, how do you do that  :( ^^^^

Possible Solution.
I haven't checked if this works, so no promises :V

Also, Naut found some sort of weird error, so you may have to change the GetPointToLine inside the GetPointInRectangle function to GetPointToLineSegment
« Last Edit: February 20, 2011, 07:39:41 PM by KuraiShoka »

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #819 on: February 20, 2011, 03:59:50 AM »
I'm stuck again, how do you do that  :( ^^^^
Also , how do you make things respond when it is being attacked by player ?
1. Make task that shoots bullets and increases counter variable
2. Make global "explodebullets" variable
3. When counter variable gets to x, explodebullets = true
4. In the bullet object code, check every frame if explodebullets is true. If so,
5. Check if(obj.x>left && obj.x<right && obj.y>top && obj.y<bottom). If so, explode bullet.

Second, if GetEnemyLife is less then it was last frame. Or some other similar function.

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

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #820 on: February 20, 2011, 04:16:51 AM »
Second, if GetEnemyLife is less then it was last frame. Or some other similar function.

GetHitCount.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #821 on: February 20, 2011, 10:16:49 AM »
How do I make it so that the boss shoots two bullets at opposite angles around her body? Like Orin's zombie fairy spellcard at Lunatic. For now I only know how to make them shoot at a particular angle or in a circle around them.


Re: Danmakufu Q&A/Problem thread number 4
« Reply #822 on: February 20, 2011, 11:13:28 AM »
How do I make it so that the boss shoots two bullets at opposite angles around her body? Like Orin's zombie fairy spellcard at Lunatic. For now I only know how to make them shoot at a particular angle or in a circle around them.

Code: [Select]
CreateShot01(GetX, GetY,2, GetAngleToPlayer, RED01, 7);
CreateShot01(GetX, GetY,2, GetAngleToPlayer-180, RED01, 7);

Fires two streams of bullets, one aimed towards the player, other aimed to the opposite. Was this something like what you were looking for?
(tl;dr angle-180 points at the opposite of "angle")

Re: Danmakufu Q&A/Problem thread number 4
« Reply #823 on: February 20, 2011, 01:13:38 PM »
No, I mean the boss shoots bullets around her.

B = Boss
o = Bullet
x = Previously shot bullet

o
B
o

then

...x
.....o
..B
o
..x

then

....x
.......x
o  B  o
...x
.......x

And so on, continuing in a loop.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #824 on: February 20, 2011, 02:02:48 PM »
If you mean something like this, use trigonometry.

e.g.
Add "let a=0;" before @Initialize and put this into @MainLoop:
Code: [Select]
CreateShot01(GetX+50*cos(a), GetY+50*sin(a),2, a, RED01, 7);
CreateShot01(GetX+50*cos(a-180), GetY+50*sin(a-180),2, a-180, RED01, 7);
a+=2.5;

Re: Danmakufu Q&A/Problem thread number 4
« Reply #825 on: February 20, 2011, 02:16:35 PM »
Thanks, that's it. What parameter do I change to make it spin faster?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #826 on: February 20, 2011, 02:25:48 PM »
Thanks, that's it. What parameter do I change to make it spin faster?
"a+=n"

Where "n" is how much the angle increments each frame.

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #827 on: February 20, 2011, 03:52:43 PM »
Quote
---------------------------
ScriptError?C:Documents and SettingsBrazAmbiente de trabalho   h_dnhscriptSayaNoUtaSayaScript.txt?
---------------------------
mainTask??????????(72??)
?
       mainTask{

         yield;

         fire;

         movement;       

       

         task movement{

            loop{



         
~~~

What is this error about?
 :ohdear:
desudesudesu

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #828 on: February 20, 2011, 05:28:40 PM »
mainTask??????????(72??)
?
        task mainTask{

         yield;

         fire;

         movement;       


Seriously now, pay attention while typing. Or even better, learn to figure out what's wrong on silly problems like this. The error message is pointing straight at the problem.  :wat:
« Last Edit: February 20, 2011, 05:30:29 PM by Blargel »
<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.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #829 on: February 20, 2011, 06:58:18 PM »
i hate you all

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

Re: Danmakufu Q&A/Problem thread number 4
« Reply #830 on: February 20, 2011, 07:01:06 PM »

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #831 on: February 20, 2011, 09:45:40 PM »
Whoops
Sorry for making Drake hate all of humanity
 :V
desudesudesu

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #832 on: February 21, 2011, 01:29:46 AM »
Whoops
Sorry for making Drake hate all of humanity
 :V
* Myouri stabs Laplace
* Myouri uses Spell Card: [Error-finding Skill "Double Checking -Hard-"]

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #833 on: February 21, 2011, 07:48:31 AM »
How can I make a entire code to loop?

Say, I want to make fall a wall of bullets but having one of them missing, so the player can slip in that gap.
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Drake

  • *

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

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #835 on: February 21, 2011, 02:56:46 PM »
* Myouri stabs Laplace
* Myouri uses Spell Card: [Error-finding Skill "Double Checking -Hard-"]
Kinky~
 :3

desudesudesu

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #836 on: February 21, 2011, 05:44:16 PM »
I tI explained myself wrong, I want that the bullet that is missing changes to a random place everytime the code is looped.
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Schezo

  • en-counse
Re: Danmakufu Q&A/Problem thread number 4
« Reply #837 on: February 21, 2011, 06:08:09 PM »
Then when you increment your variable with

X +=;

You add a

rand(1, 7) ; or whatever Numbers float your boat after the =.

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: Danmakufu Q&A/Problem thread number 4
« Reply #838 on: February 22, 2011, 09:32:52 PM »
I was wondering after reading some threads in here. And it says that some scripts requiere the CtC Shotreplace pack...

I already have it... but I don't know how to install it... and the readme doesn't help.
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Schezo

  • en-counse
Re: Danmakufu Q&A/Problem thread number 4
« Reply #839 on: February 22, 2011, 11:38:39 PM »
It's because people are being lazy, and not pathing correctly if their script doesn't come with it already in the file they want you to play and they aren't following this thread.  Some people have this crazy idea everyone has it installed (when they don't and it only serves to make people frustrated) but if you do want it there like they want, this is what you do:

*In your th_dnh folder where your th_dnh game executor is, create a folder called lib
*Put the SHOT_REPLACE or whatever it's called folder in that.
*Scripts which require it should work now, if not, you can go back to my earlier annoyance that they should have pathed it correctly.