Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weapon: Change the team of a weapon/character
#1
I want to reproduce LF1 picking up lying characters, the problem is, when you pick them up they change team into yours. How can I change the team of a heavy weapon after being thrown/character after hitting ground?
Reply
Thanks given by:
#2
Use ik3 cpoint instead of ik2 wpoint.
Characters will only ever change teams from getting picked up via ik2/ik7 wpoint, so that's a dead end.

If you must use wpoint heavy weapon system, spawn a heavy weapon, make it catch lying, then pickup that weapon. The team change would then only affect the weapon but not the char.
[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: The_Hari
#3
[Image: J80GK3t.gif]

Wohoo, I used the second method with heavy weapon. Now, is there a way prevent weapon from leaving boundaries of a background? Because right now when you throw it out of stage, weapon is getting deleted and character is getting stuck lying
Reply
Thanks given by:
#4
Looks like you're actually using frame 184/190, because player will still get up if they are truly held in frame 230/231, and cpoint kind 2 from picked_caught should go to 212 as soon as the catcher is interrupted. Weapon only gets deleted when it touches the floor offscreen.

In any case, just put a preferred "wait" and "next" in that lying frame and that'd solve the problem.
[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:
#5
That kinda did the thing, now you no longer get stuck when you fall exactly at the edge of the screen, but still, when you try to throw them out of background, character gets stuck in cpoint until there is another object spawned (or weapon fall from sky) and then goes to frame 212 instead of the one from "next:". So I made this frame opoint a dummy object. But still, if there is a way to actually prevent weapon from leaving stage, that would be nice.

And one last thing probably, any way to use cpoint without switching positions? I tried changing coordinates, but character keeps on moving quite a few pixels when getting caught. Same problem with this cool hold_froward
Reply
Thanks given by:
#6
I see, so deletion doesn't actually remove cpoint, interesting.

Its not feasible to prevent non-type0 from exiting the boundaries. You'd basically need to spawn itr kind 14 on both sides of the stage, and even then its not going to sufficient because the way itr kind 14 stops movement is highly flawed.

In that case, the solution would be for the heavy weapon to release the character when it is thrown; this is feasible since on_hand frames are different from in_the_sky frames.
The tradeoff is that every character has to have the same throw strength (if you need variation, you will need more heavy weapons; fortunately only Mark & LouisEX have a different throw_lying_man strength).


---
EDIT:
Crap, I forgot about getting injured while holding heavy weapon. Different solution required:
* During throw, bring heavy weapon to a new on_hand frame (you can have multiple different ones for each char if you need variation in throw strength).
* In this new frame, heavy weapon will opoint kind 2 some random weapon, forcing itself off the character's grip.
* This allows heavy weapon to go to next, which throws the enemy.
IMPORTANT: delete the heavy weapon, otherwise the game will still think the character is holding a heavy weapon permanently.

Tradeoff for both above methods: You cannot aim the throw along z-axis.
-----
EDIT2:
Last option if you want to keep z-axis throw:
* Make the heavy weapon hold another weapon(can be non-weapon type) BEFORE it gets picked up by the player.
* If you are using a weapon type, make sure it is held above ground by wpoint.
* The idea is, when the heavy weapon gets deleted, the other weapon it is holding is not yet deleted but is allowed to go to 'next'. This will interact with the thrown enemy and cancel his cpoint frame.

Note: unfortunately it is not possible for this other weapon to be the one catching the enemy as a way to resolve the cpoint bugs, because you can't make the heavy weapon pick things up, only directly opoint kind 2 into its hand.
-----

Cpoint position switching is unavoidable as long as your hitboxes(itr + bdy) both need to be bigger than 1px. Ultimately, cpoint works by checking the 2 chars' x-positions and moving to the midpoint between them (I'm not sure about y-position, but z-position it will always move the victim to the catcher's).

Here's a pinned message from Discord for some numbers I've tested that might help though:
Quote:Alright, I found some perfect x-axis situations. assume all values use centerx39 centery79
Ax=100, Bx=100. ik1 must hold back.
A fr120 cx39, ck1 x38
B fr131 cx39, ck2 x40
End result is both remain at 100/100. grab faces right.
---
Ax=100, Bx=100. ik1 must hold back.
A fr120 cx39, ck1 x38
B fr131 cx39, ck2 x41
End result is both remain at 100/101. grab faces right.
---
Ax=100, Bx=101. no need to hold back.
A fr120 cx39, ck1 x39
B fr131 cx39, ck2 x40
End result is both remain at 100/101. grab faces right.
---
assuming cpoint cover: 20 (enemy faces towards you, and is 1px above your z-axis), his y is actually +1 of whatever you plan to have.
its the same appearance compensation logic as wpoint cover: 1.
when cpoint timer=0 and decrease <0, release speed is x=4, y=-3.
when stopping cpoint (such as by Grab+DvA), release into fr212 at a MINIMUM of y: -2, with speed -3. exact y-coordinate only increases if -3 or higher. no change in x-axis.
[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: The_Hari
#7
t0
Code:
<frame> 270 flame
  pic: 173  state: 3  wait: 1  next: 271  dvx: 0  dvy: 0  dvz: 0  centerx: 22  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
  itr:
      kind: 1  x: 22  y: 16  w: 1  h: 65 
      catchingact: 276 276  caughtact: 212 212 
  itr_end:
  opoint:
      kind: 1  x: 23  y: 39  action: 106  dvx: 0  dvy: 0  oid: 211  facing: 0
  opoint_end:

<frame_end>

Code:
<frame> 276 flame_forward
  pic: 210  state: 3  wait: 1  next: 277  dvx: 0  dvy: 0  dvz: 0  centerx: 22  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
  cpoint:
      kind: 1  x: 22  y: 39
      vaction: 212
  cpoint_end:

<frame_end>

t3
Code:
<frame> 106 flying
  pic: 53  state: 16  wait: 1  next: 1000  dvx: 0  dvy: 0  centerx: 22  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
  bdy:
      kind: 0  x: 22  y: 1  w: 1  h: 79
  bdy_end:
<frame_end>

Code:
<frame> 212 delete
  pic: 999  state: 9997  wait: 1  next: 1000  dvx: 0  dvy: 0  dvz: 0  centerx: 22  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
  cpoint:
      kind: 2  x: 22  y: 39
  cpoint_end:
<frame_end>

That's how I'm trying to make a hold_forward work, from what I tried opoint position needs to be bigger than centerx for it to work at all.
But altering cpoints as you posted changes nothing and character keep on moving a few pixels to the right.
Reply
Thanks given by:
#8
Frame 276 needs to be state 9 for cpoint positioning to work correctly.

I also find it odd that you are somehow able to catch the T3; by right the T3 needs to be facing towards you (i.e. opoint facing 1) because you cannot hit allied balls from the back.
[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:
#9
That's not it, works the same no matter which state I use.

Oh yeah, this opoint doesn't work, but it's a loop and I have there one more frame with opoint with proper facing
Reply
Thanks given by:
#10
Tested with the data provided, it moves forward by 9px.
I changed frame 276's cpoint x: 22 to x: 40 and it no longer shifts forward (though the grabbed object seems to be moved).

Don't ask me how the calculation works, I've no idea myself.
[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: The_Hari




Users browsing this thread: 1 Guest(s)