Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weapon: DC Questions
#21
Why is dvy: 566 applies the same thing as dvy: 16?
What's the relation between them?
Reply
Thanks given by:
#22
dvy: 16 makes the object gain 16 y-speed.
dvy: 566 sets the object to 16 y-speed.

At least that's how it should work, but somehow something breaks dvy: 566 from working the way I thought it should in the henry_arrow3.

It should be noted that LF2 speed cannot really go faster than 500, because 501 and above is reserved for setting speed to a certain number. 501 to 549 is really -49 to -1, 550 is 0, 551 onwards is 1 onwards. That's where dvy: 550 came from for setting y-speed to 0 btw, you can see dvy: 550 specifically being used in Woody's teleport.
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by: RusFeniks
#23
(12-17-2017, 01:16 PM)STM1993 Wrote:  dvy: 566 sets the object to 16 y-speed.

Wow ... I did not know that o_O
I do not understand, but it looks like analog "dx:" from pdk.. Speed does not stack, but it remains static. Only, unlike the "dx:" option, the speed is not reset when you go to the next, right?
Reply
Thanks given by:
#24
(12-17-2017, 11:21 PM)RusFeniks Wrote:  Wow ... I did not know that o_O
I do not understand, but it looks like analog "dx:" from pdk.. Speed does not stack, but it remains static. Only, unlike the "dx:" option, the speed is not reset when you go to the next, right?
I couldn't find the exact file in github that has this line of code from the source anymore, but this pretty much describes it:
    C-Code:
frame_id1_2 = dude_p->frame1;
  dvx = filePointer->frames[frame_id1_2].dvx;
  frames = (sDataFile *)((char *)filePointer + frame_id1_2 * 376);
  if ( dvx <= 500 )
  {
    if ( dvx > 0 )
    {
      // if facing right then buff x speed to dvx
      dvx_double = (double)dvx;
      if ( dvx_double > dude_p->x_velocity && !dude_p->facing )
        dude_p->x_velocity = dvx_double;
    }
    dvx_1 = frames->frames[0].dvx;
    if ( frames->frames[0].dvx > 0 )
    {
      // if facing left then buff x speed
      v112 = (double)dvx_1;
      if ( -dude_p->x_velocity < v112 && dude_p->facing == 1 )
        dude_p->x_velocity = -v112;
    }
    v123 = frames->frames[0].dvx;
    if ( frames->frames[0].dvx < 0 )
    {
      v113 = (double)v123;
      if ( v113 < dude_p->x_velocity && !dude_p->facing )
        dude_p->x_velocity = v113;
    }
    v124 = frames->frames[0].dvx;
    if ( frames->frames[0].dvx < 0 )
    {
      v114 = (double)v124;
      if ( -dude_p->x_velocity > v114 && dude_p->facing == 1 )
        dude_p->x_velocity = -v114;
    }
  }
  else                                          // else if dvx > 500
  {
    dude_p->x_velocity = (double)(dvx - 550);
  }


In practice,
Quote:If you set dv to a certain set of numbers >500, you will be able to set the object's velocity to a fixed number.

If your dvx is 501, you will ALWAYS move -49 (left)
If your dvx is 550, you just don't move at all (not the same as dvx 0 which is simply neutral i.e no acceleration).
If your dvx is 599, you will ALWAYS move +49 (right).

For Y and Z-axis, negative is UP, positive is DOWN (opposite of what you'd expect from math).
dvy 501-549 for 49-1 pixels up (fly).
dvy 551-599 for 1-49 pixels down (fall).

dvz 501-549 for 49-1 pixels up (background).
dvz 551-599 for 1-49 pixels down (foreground).

You can actually exceed 49px for down/right if you want(eg dvx 700 for 150px right), but I'm simply listing the range where all directions will be equal.
* dvX normally works as a minimum x-velocity.
* dvY normally works by acceleration (which is partly responsible for the super high Davis dragon punch bug, or why if you make a character who double jumps, the 2nd jump if done in quick succession will make the character jump ridiculously high). Using the dvy >500 property, you can instead set it to an exact number you want and bypass gravity.
* dvZ normally doesn't force you to move in a certain direction, instead you have to hold ^/v.
* For type 3 objects, the hit_j tag serves an identical purpose to dvz>500, except the number is smaller by 500 and it works alongside with z-axis aiming.
* When in mid-air, even if you set dvZ back to 0, you will continue moving in the last direction you were heading.
* dvZ overrides the default z-movement used for state 19 & 301 (which is the running z-speed).
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by:
#25
(12-17-2017, 12:36 PM)STM1993 Wrote:  Wait what, a hit_Fa: 7 state 3006 actually gets rebounded in the opposite direction(but doesn't change team) by a REGULAR hit, but not by a John shield reflect? What madness is this?!

Okay, I found a workaround, but it isn't ideal in a few specific situations - you must remove the bdy in the "flying" frames.

The arrow cannot be destroyed or rebounded, which fixes the reflecting issue above. HOWEVER:
1) Tf 2 such arrows were to go head-to-head on each other, they will not collide, they will just pass through each other.
2) The arrow will still be destroyed if it hits the bdy of another 3006 attack, which is good.
3) The arrow cannot be destroyed by a state 3005 palm attack, and will pass through John's shield harmlessly.

You can fix the non-colliding issue by adding a hidden bdy and a hidden itr (that is a bdy/itr that has a very large y-coordinate like y: 900012), so that in the specific case that these 2 arrows collide, they will still destroy each other. However fixing this for things like John's shield or the state 3005 palm attacks will require adding a hidden itr on them to hit the arrow's hidden bdy - so this method is not very useful if this Henry mod is a stand-alone character rather than part of a full LF2 mod.

This is my code for now.
    DC-Code:
<bmp_begin>
   file(0-5):   sprite\sys\henry_arrow3.bmp w: 48  h: 47  row: 3 col: 2   
   file(8-11): sprite\sys\julian_col.bmp  w: 199  h: 404  row: 4  col: 1
   file(12-15): sprite\sys\julian_col2.bmp  w: 159  h: 404  row: 4  col: 1
   file(16-30): sprite\sys\julian_exp.bmp w: 159 h: 159 row: 5 col: 3
weapon_hit_sound: data\020.wav
weapon_drop_sound: data\020.wav
weapon_broken_sound: data\020.wav
<bmp_end>
 
<frame> 1 start_flying
   ic: 0 state: 3006 wait: 0 next: 2 dvx: 23  dvy: 70  centerx: 19  centery: 24  hit_a: 500  hit_d: 2  hit_Fa: 3
<frame_end>
 
<frame> 2 flying
   pic: 0  state: 3006  wait: 0  next: 3  dvx: 23  dvy: 0  centerx: 19  centery: 24  hit_a: 1  hit_d: 3  hit_Fa: 7
   itr:
      kind: 0 x: -1 y: 12 w: 51 h: 24  dvx: 20 fall: 0  vrest: 15  bdefend: 60  injury: 50  effect: 1
   itr_end:
  <frame_end>
 
<frame> 3 flying
   pic: 0  state: 3006  wait: 0  next: 4  dvx: 23  dvy: 0  centerx: 19  centery: 24  hit_a: 1  hit_d: 4  hit_Fa: 7
   itr:
      kind: 0 x: -1 y: 12 w: 51 h: 24  dvx: 20 fall: 0  vrest: 15  bdefend: 60  injury: 50  effect: 1
   itr_end:
   <frame_end>
 
<frame> 4 flying
   pic: 0  state: 3006  wait: 0  next: 5  dvx: 23  dvy: 0  centerx: 19  centery: 24  hit_a: 1  hit_d: 5  hit_Fa: 7
   itr:
      kind: 0 x: -1 y: 12 w: 51 h: 24  dvx: 20 fall: 0  vrest: 15  bdefend: 60  injury: 50  effect: 1
   itr_end:
   <frame_end>
 
<frame> 5 flying
   pic: 0  state: 3006  wait: 0  next: 6  dvx: 23  dvy: 0  centerx: 19  centery: 24  hit_a: 1  hit_d: 6  hit_Fa: 7
   itr:
      kind: 0 x: -1 y: 12 w: 51 h: 24  dvx: 20 fall: 0  vrest: 15  bdefend: 60  injury: 50  effect: 1
   itr_end:
  <frame_end>
 
<frame> 6 flying
   pic: 0  state: 3006  wait: 0  next: 2  dvx: 23  dvy: 0  centerx: 19  centery: 24  hit_a: 1  hit_d: 2  hit_Fa: 7
   itr:
      kind: 0 x: -1 y: 12 w: 51 h: 24  dvx: 20 fall: 0  vrest: 15  bdefend: 60  injury: 50  effect: 1
   itr_end:
   <frame_end>
 
<frame> 10 hiting
   pic: 2  state: 3001  wait: 1  next: 11  dvx: 0  dvy: 0  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 11 hiting
   pic: 1  state: 3001  wait: 1  next: 12  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 12 hiting
   pic: 2  state: 3001  wait: 1  next: 13  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 13 hiting
   pic: 1  state: 3001  wait: 1  next: 1000  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 20 hit
   pic: 2  state: 3002  wait: 1  next: 21  dvx: 0  dvy: 0  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 21 hit
   pic: 1  state: 3002  wait: 1  next: 22  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 22 hit
   pic: 2  state: 3002  wait: 1  next: 23  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 23 hit
   pic: 1  state: 3002  wait: 1  next: 1000  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 30 rebounding
   pic: 3  state: 3003  wait: 1  next: 110  dvx: 0  dvy: 0  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 31 rebounding
   pic: 4  state: 3003  wait: 1  next: 110  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 40 tail
   pic: 999  state: 3005  wait: 0  next: 1000  dvx: 0  dvy: 0  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 60 hitting_ground
   pic: 3  state: 3001  wait: 1  next: 61  dvx: 0  dvy: 0  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
   sound: data\020.wav 
   opoint:
      kind: 1 x: 80 y: 77 action: 110 dvx: 0  dvy: 0  oid: 333  facing: 0
   opoint_end:
   <frame_end>
 
<frame> 61 hitting_ground
   pic: 4  state: 3001  wait: 1  next: 110  dvx: 0  dvy: 550  centerx: 19  centery: 24  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 110 explosion
sound: data\089.wav  
   pic: 16  state: 18  wait: 1  next: 111  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 133  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind:   0 x: 23 y: 36 w: 112 h: 110  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 111 explosion
sound: data\071.wav 
   pic: 17  state: 18  wait: 1  next: 112  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 133  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 20  y: 16  w: 122  h: 135  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 112 explosion
   pic: 18  state: 18  wait: 1  next: 113  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 133  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 19  y: 18  w: 127  h: 131  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 113 explosion
   pic: 19  state: 18  wait: 1  next: 114  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 133 hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 7  y: 16  w: 146  h: 132  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 114 explosion
   pic: 20  state: 18  wait: 1  next: 115  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 135  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 13  y: 13  w: 137  h: 132  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 115 explosion
   pic: 21  state: 18  wait: 1  next: 116  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 140  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 7  y: 14  w: 145  h: 117  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 116 explosion
   pic: 22  state: 18  wait: 1  next: 117  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 142  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 15  y: 6  w: 128  h: 123  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 117 explosion
   pic: 23  state: 18  wait: 1  next: 118  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 149  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 0  x: 15  y: 6  w: 128  h: 123  dvx: -12  dvy: -18  fall: 70  vrest: 300  bdefend: 16  injury: 75  zwidth: 37  
      effect: 23  
   itr_end:
<frame_end>
 
<frame> 118 explosion
   pic: 24  state: 18  wait: 1  next: 119  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 156  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 119 explosion
   pic: 25  state: 18  wait: 1  next: 120  dvx: 0  dvy: 0  dvz: 0  centerx: 78  centery: 162  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 120 explosion
   pic: 26  state: 18  wait: 1  next: 1000  dvx: 0  dvy: 0  dvz: 0  centerx: 76  centery: 157  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>


When it hits another object with state 3006, it destroys without playing the animations. I am trying to lead the next frame into the explosion too.. trying to make it explode if it meets another 3006 state objects. So I put the next: 110 but the frame doesn't go to the 110 frame. What can I do for that?

Thanks is advance!
Reply
Thanks given by:
#26
frame 20 hitting. next: 110.
Or just make frame 20 a copy of frame 110.
[Image: uMSShyX.png]
~Spy_The_Man1993~
Steiner v3.00 (outdated), Challenge Stage v1.51
Luigi's Easier Data-Editor, A-Man's Sprite Mirrorer
Working on the LF2 Rebalance mod.
Avatar styled by: prince_freeza
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)