Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New problem with teleport(dvy)
#1
My proble isnt solved. My new problem is not matching with the attack. In my attack clones teleports to the enemy, attack, inflict damage, but does not fully coincide with the enemy. The attack is not the end hits the ground and I can not improve. I am counting on your help.

Code:
<bmp_begin>

file(0-3): sprite\sys\atak1.bmp w: 150  h: 120  row: 4  col: 1

<bmp_end>



<frame> 0 flying

   pic: 999  state: 400  wait: 4  next: 1  dvx: 0  dvy: -50  dvz: -50  centerx: -60  centery: 150  hit_a: 0  hit_d: 0  hit_j: 0

<frame_end>

<frame> 1 flying

   pic: 0  state: 3005  wait: 4  next: 2  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 150  hit_a: 0  hit_d: 0  hit_j: 0

<frame_end>



<frame> 2 flying

   pic: 2  state: 3005  wait: 8  next: 3  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 150  hit_a: 0  hit_d: 0  hit_j: 0
itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 dvy: -40 injury: 100 bdefend: 70 fall: 70 vrest: 40
  itr_end:

   bdy:

      kind: 0  x: 29  y: 4  w: 98  h: 24

   bdy_end:

<frame_end>

<frame> 3 flying

   pic: 3  state: 3005  wait: 4  next: 1000  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 150  hit_a: 0  hit_d: 0  hit_j: 0

<frame_end>

<frame> 10 hiting

  pic: 2  state: 3000  wait: 10  next: 11  dvx: 0  dvy: -15  dvz: -50  centerx: -60  centery: 75  hit_a: 0  hit_d: 0  hit_j: 0

  itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 injury: 100 bdefend: 70 fall: 50 vrest: 10
  itr_end:

   bdy:

      kind: 0  x: 29  y: 4  w: 98  h: 24

   bdy_end:

<frame_end>



<frame> 11 hiting

   pic: 3  state: 3000  wait: 4  next: 1000  dvx: 0  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0

<frame_end>


Code:
<frame> 240 klon

   pic: 79 state: 15 wait: 4 next: 999 dvx: 0 dvy: 0 dvz: 0 centerx: 39  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0 mp: 30

opoint:

      kind: 1  x: 120 y: 79 action: 0 dvx: 0  dvy: 0  oid: 265 facing: 0

   opoint_end:

wpoint:

      kind: 1  x: 33  y: 58  weaponact: 21  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0

   wpoint_end:

   bdy:

      kind: 0  x: 21  y: 18  w: 43  h: 62

   bdy_end:

<frame_end>
Reply
Thanks given by:
#2
I do not really understand what you are trying to say. Why don't you record it and show us what's happening?
you don't want to see this (Click to View)
avatar by Una
the other by xFire
Reply
Thanks given by:
#3
This is video.
http://www.speedyshare.com/files/23559043/clip0001.avi
Reply
Thanks given by:
#4
Your code seems to have quite a few strange values in there I don't really understand. So I'll tell you what I would do.
The first frame should have a sate 400 to teleport to the enemy (you've got that) and a pic: 999 (you have that, too). As with sate: 400 you always teleport 120 pixels beside the enemy, you need a dvx: 120 and a wait: 0 (or alternatively dvx: 60 wait: 1 etc.) and a dvx: 550 in the next frame to stop the movement. There you've got some rather strange values for dvy: and dvz: What are they for? Also, when you have that dvx: 120, your centerx should be around 75.
Same for the other frames, no dvz: and instead of centerx: -60 you should use 75
The itr: in frame 2 should then hit the enemy. However, as the attack has stae: 3005 I'm not sure whether it would go to the hitting frames.


Edit: Wait a minute, i'm watching the video.
Strange, the dvz: doesn't seem to have any effect at all. The centerx: -60 does what a dvx: 120 usually would have done, but it will have an effect on the hitting area. If you work with dvx: 120 instead, you have to put it into the frame after the teleport.
The problem with the height is probably only caused by the centery: 150, change it to 120. Centery: should always be as big as the height while centerx: usually is half of the w: (in this case not).
As a side note: If you'd lowered the wait or catched the enemy with an itr/k: 3, the clones wouldn't attack when the enmy is already away.
tl;dr: Height is probably a simple centery: error. If the attack doesn't coincided it is probably because
1. it appears very slowly
2. the picture isn't shown where the computer thinks the attack is. To be precise, the picture is shown 135 pixels away ( 75-(-60))

Edit²: I tried it out, this code works. I took Firen exp as an image, but that shouldn't make any difference. And I changed a few wait: values. Except for frame 1, you might "rechange" them the way you like to.
    DC-Code:
<bmp_begin>
file(0-3): sprite\sys\firen_exp.bmp  w: 150  h: 120  row: 4  col: 1
weapon_hit_sound: data\020.wav
weapon_drop_sound: data\020.wav
weapon_broken_sound: data\020.wav
<bmp_end>
 
 
<frame> 0 flying
 
   pic: 999  state: 400  wait: 3  next: 1  dvx: 0  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
 
<frame_end>
 
<frame> 1 flying
 
   pic: 0  state: 3005  wait: 0  next: 2  dvx: 120  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
 
<frame_end>
 
 
 
<frame> 2 flying
   pic: 2  state: 3005  wait: 3  next: 3  dvx: 550  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 dvy: -40 injury: 100 bdefend: 70 fall: 70 vrest: 40
  itr_end:
   bdy:
      kind: 0  x: 29  y: 4  w: 98  h: 24
   bdy_end:
<frame_end>
 
<frame> 3 flying
   pic: 3  state: 3005  wait: 1  next: 1000  dvx: 0  dvy: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 10 hiting
  pic: 2  state: 3001  wait: 5  next: 11  dvx: 0  dvy: 0  dvz: 0 centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
  itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 injury: 100 bdefend: 70 fall: 50 vrest: 10
  itr_end:
   bdy:
      kind: 0  x: 29  y: 4  w: 98  h: 24
   bdy_end:
<frame_end>
 
<frame> 11 hiting
   pic: 3  state: 3000  wait: 2  next: 1000  dvx: 0  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
Reply
Thanks given by: Krixen
#5
Thanks for the advice, just test it. But I did the same at the beginning and I was just a problem, because the attack had never coincided with the figure, was always on the side, and DVX 120 did not help. Well, thanks centerx: -60 I was able to move it.
After watching the movie so I have continued to solve the problem?


@Reaper thanks for help.
It was enough to centery changed to 120 and it works. Attack moves straight to the enemy.
I would ask the admins that have not yet check this topic [SOLVED] to tonight, I do not want new topics.
Reply
Thanks given by:
#6
I don't know this will help, but you can experiment with the teleporting attack dvx's that works.
DVZ controls diagonal movement of a char. It don't affect a ball that have no AI. Instead hit_j: XXX is used.


    DC-Code:
<frame> 364 #teleprting_frame-must_use_wait_1
   pic: 999  state: 400  wait: 1  next: 365  dvx: 0  dvy: 0  dvz: 0  centerx: 39  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
 
<frame> 365 #moving_to_enemy
   pic: 999  state: 3005  wait: 0  next: 366  dvx: 120  dvy: 0  dvz: 0  centerx: 39  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
 itr:
      kind: 3  x: -20  y: 16  w: 84  h: 65  
      dvx: 0  dvy: 0  fall: 60  arest: 15  bdefend: 60  injury: XXX  
   itr_end:
<frame_end>
 
 
<frame> 366 stoping_movement_when_onspot_of_enemy
   pic: 999  state: 3  wait: 3  next: 154  dvx: 550  dvy: 0  dvz: 0  centerx: 39  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 3  x: -20  y: 16  w: 84  h: 65  
      dvx: 0  dvy: 0  fall: 60  arest: 15  bdefend: 60  injury: XXX 
   itr_end:
<frame_end>
[Image: illidansig1.png]
Reply
Thanks given by: Krixen
#7
i hope you`re kidding about this ik3

http://lf-empire.de/en/lf2-empire/data-c...on?start=3

you missed a few tags :p
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#8
Thanks boys for all ,but my attack already work. Reaper's metod also work and WoodySmasher;s metod Iam did not check.:)
I almost forgot, mu question is:
Is it possible to make an attack to loader, having two levels?, and if so could you give me any tips?
Reply
Thanks given by:
#9
Yes, it is. However, it's a bit more complicated, depending on how you want to have it. You'll find some threads about it when you search for "charging" in the DC section.
http://www.lf-empire.de/forum/showthread...t=charging <-- Holding the backwards-button for charging.
http://www.lf-empire.de/forum/showthread...t=charging <-- Input-holding
If you just want the attack to notice whether you pressed A after 1 second or 5 seconds that's actually a lot easier. Just one charging frame that lasts 1 second and another lasting 4 seconds with different hit_whatever, so they lead to different attacks.

Why I actually write this: You did only change centery? Then if you want to do me a favour: VS-mode, select 3-4 players and check the area the attack works. As I said, the hitting area might be right to hit the enemy, but it could also hit enemies standing aside due to the 120 pixel misplacement.
Reply
Thanks given by:
#10
I knew it would not end my problems. I made my attack in the second attack, the same date copied, added only one frame and changed the sprites.
So my problem is that when I push foward Defend jump after another as it happens in the first seconds of the movie, and when I push them both if the attack works normally. But there is one thing, you can see on film that when itachi went to the wall and I attacked it sprites have changed. I changed only when the opponent is at his side. How do I fix it?
I'm not sure if all this flying2 did well, and I do not know whether it is to attack when the opponent is hit into the cage hiting2 passes (another state in flying2)?
http://www.speedyshare.com/files/23563483/clip0002.avi

Code:
<frame> 4 flying2
   pic: 999  state: 400  wait: 2  next: 5  dvx: 0  dvy: -50  dvz: -50  centerx: -60  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>

<frame> 5 flying2
   pic: 4  state: 3005  wait: 4  next: 6  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>

<frame> 6 flying2
   pic: 5  state: 3005  wait: 6  next: 7  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>

<frame> 7 flying2
   pic: 6  state: 3005  wait: 7  next: 8  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 dvy: -40 injury: 100 bdefend: 70 fall: 70 vrest: 40
  itr_end:
   bdy:
      kind: 0  x: 29  y: 4  w: 98  h: 24
   bdy_end:
<frame_end>

<frame> 8 flying2
   pic: 7  state: 3005  wait: 6  next: 1000  dvx: 0  dvy: 0  dvz: -50  centerx: -60  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>

<frame> 12 hiting2

  pic: 6  state: 3000  wait: 10  next: 13  dvx: 0  dvy: -15  dvz: -50  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0

  itr:
    kind: 0 x: 50 y: 80 w: 50 h: 40 injury: 100 bdefend: 70 fall: 50 vrest: 10
  itr_end:

   bdy:

      kind: 0  x: 29  y: 4  w: 98  h: 24

   bdy_end:

<frame_end>



<frame> 13 hiting2

   pic: 7  state: 3000  wait: 6  next: 1000  dvx: 0  dvy: 0  dvz: 0  centerx: 75  centery: 120  hit_a: 0  hit_d: 0  hit_j: 0

<frame_end>
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)