Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Using z pos in a move?
#1
Hello peeps, I've been wandering for quite a while on this site (even though I just had the idea of joining the forum) and I think the best is to ask questions directly instead of trying to find the exact same problem, hope I can try helping people too :D

So, I'm trying to make a move for my character that would move on the z-axis.
The idea is that there's a main ball crossing the screen (starting from top) and that is shooting other balls.
I don't know if I can link videos but you can see Touhou 3d Marisa vs Flandre on youtube at 4:50 to have a better understanding.

My first try was kinda nice, it was a rain of colored balls, but I had a few probs:
1. I wanted more of a "shooting star" effect than actually have random balls falling in anarchy (still was beautiful lol)
2. Using only dvx and dvy to move the balls, I had to use a large zwidth number to make it reach all the screen.
3. Hit_a wasn't working properly and the attack was going on for ever (but since it was going downwards, it gets out of the screen)

I'm now using this pattern for each colored ball
    DC-Code:
<frame> 0 Red
  pic: 0  state: 3005  wait: 1  next: 1  dvx: 14  dvy: 2  dvz: 0  centerx: 8  centery: 16  hit_a: 20  hit_d: 35  hit_j: 0 
  itr:
     kind: 0  x: 2  y: 2  w: 13  h: 13  vrest: 15  fall: 60  bdefend: 30  injury: 4  zwidth: 10  effect: 1
  itr_end:
<frame_end>
 
<frame> 1 Red
  pic: 0  state: 3005  wait: 10  next: 0  dvx: -14  dvy: 2  dvz: 0  centerx: 8  centery: 16  hit_a: 20  hit_d: 35  hit_j: 0 
  itr:
     kind: 0  x: 2  y: 2  w: 13  h: 13  vrest: 15  fall: 60  bdefend: 30  injury: 4  zwidth: 10  effect: 1
  itr_end:
  opoint:
     kind: 1  x: 30  y: -20  action: 2  dvx: 3  dvy: 1  oid: 271  facing: 0
  opoint_end:
<frame_end>


It's making a cross-like attack (because the chara is opointing 2 times the attack facing front/back) which is closer of what i'm looking for but the endless attack prob isn't fixed. Should I simply use a certain number of frames for each ball until the end or pray for the timer to stop the attack? xD

So after this quite long first post, I'd like to know what you guys think :P
Also, some of the attack animations of my characters are blinking while playing, not sure why since each frame is connected and no picture is missing.
And Then Will There Be None?
Reply
Thanks given by:
#2
to achieve this kind of raining attack is not really hard, but very troublesome.
how:
1. make a ball that can hit the ground(check out firzen's chase), it will chase the enemy(for now)
2. after making sure it can hit the ground beautifully, make a ball that oppoints those falling balls, but move straight(dvx:? dvy:550 dvz:0). so now you have it spawning chase balls in a straight line.
3. the ball that oppoints those falling balls must have a dvz550 AFTER A WHILE so when you oppoint a lot of these(facing: ?), it will LATER move in a straight line to achieve the raining effect.
4. now the ground hitting ball still chases, right? and we dont want that. make one without the hit_Fa things. NO hit_a, hit_j, hit_d. nothing. just a normal one, not even moving on its own.
5. check the spawning ball and add to the oppoint a forward and downward movement(example dvx: 9 dvy:9)
6. if im not wrong, now you will have a ball spawning ground hitting balls in a line, which will only move in a straight line(can move up and down at first)
7. add the facing in oppoint, done.

if you really need an example, wait till my exam's finish and i will do one for you. its just a few days more.

edit: forgot to mention add dvx:550 dvy: 550 dvz: 550 to hit_ground frames
back from the dead.....kinda
Reply
Thanks given by:
#3
To manipulate z movement you have two options:

Either use a multiple of 10 for the facing of the opoint (like Henrys multi shot). That will spread out several projectiles on the z axis automatically.
Or use a hit_j value within the object to move it along the z axis (Davis/Dennis/Woodys blasts use this). hit_j: 50 is basically no z movement, smaller values make the object go up, larger ones down.

You can also give the player control over the initial z direction with a dvz value inside the opoint.
Reply
Thanks given by:
#4
Thanks for your help! I have school for now so i'll test these later :P

I've tried using hit_j before but for some reason the balls were falling for a short while in the z-axis then they were going into a straight line.
The multiple facing idea looks interesting, I didn't think of that, but I'll start with Nyamaiku's method and see what I can achieve :D


Edit: I've created the chasing balls and they work properly, except when I try to opoint them, the game crashes.
To fix that, I added a frame that loops on itself (the moving in a straight line ball) and opoints another frame that will go back to the flying frames.
    DC-Code:
<frame> 70 start
  pic: 0  state: 3005  wait: 5  next: 70  dvx: 5  dvy: 550  dvz: 0  centerx: 8  centery: 16  hit_a: 10  hit_d: 100  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 16  action: 71  dvx: 0  dvy: 0  oid: 271  facing: 0 
  opoint_end:
<frame_end>
 
<frame> 71 start
  pic: 8  state: 3005  wait: 10  next: 999  dvx: 5  dvy: 550  dvz: 0  centerx: 8  centery: 16  hit_a: 0  hit_d: 0  hit_j: 0  
<frame_end>

And here are the flying frames:
    DC-Code:
<frame> 0 flying
  pic: 0  state: 3000  wait: 0  next: 1  dvx: 0  dvy: 0  dvz: 0  centerx: 8  centery: 16  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 3  
<frame_end>
 
<frame> 1 flying
  pic: 0  state: 3000  wait: 0  next: 2  dvx: 0  dvy: 0  dvz: 0  centerx: 8  centery: 16  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
<frame_end>
 
<frame> 2 flying
  pic: 0  state: 3000  wait: 0  next: 3  dvx: 0  dvy: 0  dvz: 0  centerx: 8  centery: 16  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
<frame_end>
 
<frame> 3 flying
  pic: 0  state: 3000  wait: 0  next: 0  dvx: 0  dvy: 0  dvz: 0  centerx: 8  centery: 16  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
<frame_end>


However I don't understand the 3rd and 4th step of your method, the main ball is already moving in a straight line, why the dvz:550? Does step 4 mean that i need to create another .dat file? if so, how does it attach to the current attack?
That said, I can't do the 5th step :P
And Then Will There Be None?
Reply
Thanks given by:
#5
step3
dvz:550 after a while
because when you oppoint with multiple facings there will spread, and all of them will stick to the upper boundary and lower boundary
so you want them to spread a little at first, then use 550 to stop them from spreading too much


step4
just remove the hit_Fa tag of the chase ball.
and make the hit_a and hit_d become 0.
dvx: 0 dvy: 0 dvz: 550


edit: i will make an example today, the ball only requires 1 data file, would you want the rain to go forever or just a certain range?
back from the dead.....kinda
Reply
Thanks given by:
#6
(12-04-2013, 04:37 AM)Nyamaiku Wrote:  step3
dvz:550 after a while
because when you oppoint with multiple facings there will spread, and all of them will stick to the upper boundary and lower boundary
so you want them to spread a little at first, then use 550 to stop them from spreading too much
I made mine in another way since I couldn't opoint the flying frames directly and the spreading is just good :P
(12-04-2013, 04:37 AM)Nyamaiku Wrote:  step4
just remove the hit_Fa tag of the chase ball.
and make the hit_a and hit_d become 0.
dvx: 0 dvy: 0 dvz: 550
I tried that, however since the flying frames are looping, the hit_Fa tag is reactivated. I tried to loop the last flying frame
to solve that but then the balls can't hit the floor anymore (I think I can use type 2 for that)

(12-04-2013, 04:37 AM)Nyamaiku Wrote:  edit: i will make an example today, the ball only requires 1 data file, would you want the rain to go forever or just a certain range?

It's for a certain range only :P
I made one mixing both of your methods, Here is what it looks like:

First the character opoints the main ball that will "randomly" opoints secondary balls:
    DC-Code:
<frame> 170 start
  pic: 0  state: 3005  wait: 0  next: 171  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 4  y: 20  action: 83  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 171 start
  pic: 0  state: 3005  wait: 0  next: 172  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 81  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 172 start
  pic: 0  state: 3005  wait: 0  next: 173  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 79  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 173 start
  pic: 0  state: 3005  wait: 0  next: 174  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 77  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 174 start
  pic: 0  state: 3005  wait: 0  next: 175  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 80  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 175 start
  pic: 0  state: 3005  wait: 0  next: 176  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 78  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 176 start
  pic: 0  state: 3005  wait: 0  next: 177  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 82  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 177 start
  pic: 0  state: 3005  wait: 0  next: 178  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 4  y: 20  action: 80  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 178 start
  pic: 0  state: 3005  wait: 0  next: 179  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 77  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 179 start
  pic: 0  state: 3005  wait: 0  next: 180  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 82  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 180 start
  pic: 0  state: 3005  wait: 0  next: 181  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 83  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 181 start
  pic: 0  state: 3005  wait: 0  next: 182  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 81  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 182 start
  pic: 0  state: 3005  wait: 0  next: 183  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 78  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 183 start
  pic: 0  state: 3005  wait: 0  next: 184  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 79  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 184 start
  pic: 0  state: 3005  wait: 0  next: 185  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 4  y: 20  action: 77  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>
 
<frame> 185 start
  pic: 0  state: 3005  wait: 0  next: 186  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 81  dvx: 0  dvy: 0  oid: 271  facing: 41 
  opoint_end:
<frame_end>
 
<frame> 186 start
  pic: 0  state: 3005  wait: 0  next: 170  dvx: 10 dvy: 0  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
  opoint:
 	 kind: 1  x: 6  y: 20  action: 79  dvx: 0  dvy: 0  oid: 271  facing: 30 
  opoint_end:
<frame_end>


Then the balls that will themselves opoint to the flying frame of each colored ball
    DC-Code:
<frame> 77 start O
  pic: 1  state: 3005  wait: 5  next: 90  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  
<frame_end>
 
<frame> 78 start Y
  pic: 2  state: 3005  wait: 5  next: 95  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>
 
<frame> 79 start G
  pic: 3  state: 3005  wait: 5  next: 100  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>
 
<frame> 80 start LB
  pic: 4  state: 3005  wait: 5  next: 105  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>
 
<frame> 81 start B
  pic: 5  state: 3005  wait: 5  next: 110  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>
 
<frame> 82 start P
  pic: 10  state: 3005  wait: 5  next: 115  dvx: -1  dvy: 1  dvz: 550  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>
 
<frame> 83 start R
  pic: 0  state: 3005  wait: 5  next: 999  dvx: -1  dvy: 1  dvz: 55  centerx: 12  centery: 24  hit_a: 5  hit_d: 300  hit_j: 0  hit_Fa: 3
<frame_end>


Flying frames (x7) :
    DC-Code:
<frame> 0 flying
  pic: 0  state: 3000  wait: 0  next: 1  dvx: 0  dvy: 0  dvz: 0  centerx: 12  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 3  
<frame_end>
 
<frame> 1 flying
  pic: 0  state: 3000  wait: 0  next: 2  dvx: 0  dvy: 0  dvz: 0  centerx: 12  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
  itr: 
     kind: 0  x: 4  y: 4  w: 17  h: 17  dvx: 1  dvy: -1  fall: 50  vrest: 20  bdefend: 20  injury: 2  effect: 1
  itr_end:
<frame_end>
 
<frame> 2 flying
  pic: 0  state: 3000  wait: 0  next: 3  dvx: 0  dvy: 0  dvz: 0  centerx: 12  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
  itr: 
     kind: 0  x: 4  y: 4  w: 17  h: 17  dvx: 1  dvy: -1  fall: 50  vrest: 20  bdefend: 20  injury: 2  effect: 1
  itr_end:
<frame_end>
 
<frame> 3 flying
  pic: 0  state: 3000  wait: 0  next: 4  dvx: 0  dvy: 0  dvz: 0  centerx: 12  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0  hit_Fa: 7
  itr: 
     kind: 0  x: 4  y: 4  w: 17  h: 17  dvx: 1  dvy: -1  fall: 50  vrest: 20  bdefend: 20  injury: 2  effect: 1
  itr_end:
<frame_end>
 
<frame> 4 flying
  pic: 0  state: 3000  wait: 0  next: 0  dvx: 0  dvy: 0  dvz: 0  centerx: 12  centery: 24  hit_Fa: 7  
  itr: 
     kind: 0  x: 4  y: 4  w: 17  h: 17  dvx: 1  dvy: -1  fall: 50  vrest: 20  bdefend: 20  injury: 2  effect: 1
  itr_end:
<frame_end>


What happens is a red ball moving on a straight line shooting a first arc of balls that will become chasingballs.
I still want to see your way of doing it :P I'll post the final result then :D
And Then Will There Be None?
Reply
Thanks given by:
#7
argh, i forgot you need hit_Fa: 7 to hit the ground...
almost half of what i said above is wrong...
to apologize, i will say
its hard for me to explain everything. here is the rain effect:
clicky
i wrote some explainations in the dc code. choose John-o and use DJA. he will create a rain of energy balls.
i made it within 15 minutes, its just to show you the concept, so dont complain about the bad rain effect, ok? :lion:
back from the dead.....kinda
Reply
Thanks given by: GentleSlayer
#8
Thanks for the help!

Now I understand why LF2 was crashing when I tried to opoint my flying frames (didn't put bdy XD) and how the hit_a really works :D
The only problem is that it's not exactly the effect that I was looking for :P
The raining is nice, but my idea was that the "main" ball would be the one travelling in the z-axis (kinda like a shooting star going downards).

I followed your way of doing it and kept the chase, I added the hit_j tag and now I get what I want, except I'd like more infos on how the
hit_j tag works, because when im on the top of the screen, the ball travels down, but the closer I get to the bottom, the sooner it stops
going downwards. I wonder if the balls is rebounding on the bottom of the screen or something.

I recorded the difference between what you did and how I made mine (Don't look at the damage output I changed it already and I took the first screen recorder I found so sorry for bad quality xD).
Again thanks for helping me peeps and if any of you still have more info about this, don't hesitate to post! :D
And Then Will There Be None?
Reply
Thanks given by:
#9
(12-04-2013, 06:12 PM)DrGentleSlayer Wrote:  I followed your way of doing it and kept the chase, I added the hit_j tag and now I get what I want, except I'd like more infos on how the
hit_j tag works, because when im on the top of the screen, the ball travels down, but the closer I get to the bottom, the sooner it stops
going downwards. I wonder if the balls is rebounding on the bottom of the screen or something.

hit_j: 49 is a bit like dvz: -1
and hit_j: 51 like dvz: 1

You can push your object to the very back with hit_j: 1 within the first frame and then let it move the other way.
Reply
Thanks given by: GentleSlayer
#10
you know, using hit_j tags to move around the z-axis, is not moving toward the ground(if thats what you want).

just in case you didnt know:
-moving left and right is X-axis
-moving toward the ground or sky is Y-axis
-moving *up and down* is Z-axis (Facepalm cant find words to replace up and down)


:s and i thought you want to achieve a rain effect?...im in a bit or a RAEG now...i watched the Touhou video,
Flandre casted a rain of multiple colored balls at 4.50, which is what you asked us to see for better understanding.
so what exactly is the effect you want to achieve? if all you want is a shooting star thingy(aka a ball moving towards the ground), it could have been a whole lot easier.


edit: not having bdys will not crash lf2
back from the dead.....kinda
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)