Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Team Attack, Ik8 only to allies?
#1
Hello Peeps!

I just made a 4-man team attack by messing with itrs kind:8(can work with any number of people) and it's working nearly perfectly well.

The only problem I have is that since it's ik8, you can actually do that attack with enemy players. Although it's pretty funny to see the cpu team up with ennemies, I would like to know if it's possible to restrain the itr to somehow only hit your team.

I thought of using an itr kind:3 to grab ennemies and put them in a frame where they don't have that special bdy, but then it would cut them no matter what they are doing.

Also on the AI part, I would like to know how could I make it so the ai only uses this move when one the of the members does it(right now they just spam it whenever they can, because I can't seem to be able to find the proper conditions). Self.team seems like it would be the variable I need but I have no clue in how to use that or what does it mean.

I can provide you with the full method if it can help you understand/find a solution, just trying to avoid confusion on first post :P
And Then Will There Be None?
Reply
Thanks given by: Memento
#2
Try covering that kind 8 up with a kind 3 of the same size in the same frame. Make sure it comes before it (not a catching one, just a normal one with properties of your choice - effect 5 and no injury if you like). With a little luck and tinkering that one will always connect instead of the kind 8 in case it is an opponent.

For interactive team AI you will need to cycle through all 400 game objects checking for close team mates that meet the conditions to perform the move (distance/mp/hp, self.team == target.team, whatever it takes).
Here is a loop over all objects to get you started:
http://www.lf-empire.de/forum/showthread.php?tid=7976
Reply
Thanks given by: GentleSlayer
#3
Hmm doesn't seem like it's working, you meant kind 0 not kind 3 right? The attack is definitely hitting them since they are going in their hurt frames and then fall, not taking any damage though. This is whether the tags : effect 5, injury:0, fall:0 and bedefend:0 are present or not. I could use fall: -1 but then nobody would be able to stop the team attack.

If you did mean kind 3 then they simply switch x positions :P

For the AI it's gonna take me a bit more time to get in since I use really basic operators. (OMG I just found out that "target" doesn't necessarily mean enemy! which explains bugs I had with other AI)

Edit: Seems I understood the AI stuff faster than I thought I would, I don't have time to test just now, but allow me to ask if this is
correct:
The loop I'm going to make only has to go to 50 since I'm looking for characters,then I make sure the character is in my team with self.team == target.team and add "target.frame == x" with "or" between each possible frames the teammates can be in and finally set the maximum distance, this way as soon as one of the teammate is starting the combo, the AI is going to respond to it!! :D
And Then Will There Be None?
Reply
Thanks given by:
#4
(03-01-2015, 02:44 AM)GentleSlayer Wrote:  Hmm doesn't seem like it's working, you meant kind 0 not kind 3 right? The attack is definitely hitting them since they are going in their hurt frames and then fall, not taking any damage though. This is whether the tags : effect 5, injury:0, fall:0 and bedefend:0 are present or not.
Yes, sounds like you are hitting too often? Maybe the right arest and dvx to push them out of the way could help.

(03-01-2015, 02:44 AM)GentleSlayer Wrote:  allow me to ask if this is
correct
It is.
Reply
Thanks given by:
#5
Success :D The itr is doing its job and people can still throw projectiles to stop the combo :D -> while writting this, NVM the itr seems to be making the teleporting lag, which desyncs the rest of the attacks for some reason o:
THE AI IS TRULY AMAZING IT'S WORKING PERFECTLY AND I LOVE THIS SUCH HYPE FOR FUTURE AI, THANK YOU SO MUCH FOR OPENING THAT DOOR TO ME :D

Ahem, So if anyone would like to know the combo works, here it is:

1. I wanted a team attack where it would happen only when all four(or possibly more) are in a "combo state"

2. For that, I separate them into 2 groups of 2, Player 1 opoints a ball with a special itr that will stick to Player 2's special bdy, and Player 3 will opoint an invisible bdy(himself in a special frame) that will stick to player 4. The reason I'm using a bdy instead of a ball in the second group is that later the 1st and 2nd group will be merged, but ik8 can only hit type 0 objects.

3. Then the itr of players 1 and 2 will stick to players 3 and 4's bdy.The itr only exists if players 1 and 2 are connected, and the bdy only exists if players 3 and 4 are connected. Now we only have 1 bdy after these two are merged.

4. You put a special itr in every player's frame to stick with this previous bdy, which will make everyone teleport to it(in this case they will always teleport to player 4's location). Then you can add some dvx in the next frames so that they all stand besides eachother.

Once this is done, you can start adding each person's attack to create any kind of combo. The only thing that can happen is that if one of the players is hit after having his bdy connected to his ally, the attack will still occur but the hit character won't be joining it(even though you can join the attack while it's happening).

This is how it can look like:
Player 1
    DC-Code:
<frame> 376 BritFlan
   pic: 60  state: 3  wait: 100  next: 377  dvx: 0  dvy: 0  centerx: 39  centery: 79  hit_a: 0  hit_d: 999  hit_j: 999
   sound: data\lesgo.wav
   bdy:
      kind: 0  x: 14  y: 15  w: 54  h: 66
   bdy_end:   
   itr:
      kind: 8  x: -420  y: -10200  w: 900  h: 95  dvx: 378  injury: 0  zwidth: 500
   itr_end:
   itr:
      kind: 8  x: -450  y: -10960  w: 950  h: 100  dvx: 382  injury: 0  zwidth: 500
   itr_end:
   opoint:
      kind: 1  x: 41  y: 100  action: 300  dvx: 0  dvy: 0  oid: 282  facing: 0
   opoint_end:   
<frame_end>


Player 2
    DC-Code:
<frame> 376 FlanBrit
   pic: 63  state: 3  wait: 100  next: 377  dvx: 0  dvy: 0  centerx: 65  centery: 139  hit_a: 0  hit_d: 999  hit_j: 999
   sound: data\laugh.wav
   bdy:
      kind: 0  x: 41  y: 61  w: 53  h: 80
   bdy_end:   
   bdy:
      kind: 0  x: -70  y: -10700  w: 240  h: 60
   bdy_end:
   itr:
      kind: 8  x: -400  y: -10100  w: 900  h: 95  dvx: 378  injury: 0  zwidth: 500
   itr_end:
   itr:
      kind: 8  x: -450  y: -10960  w: 950  h: 100  dvx: 382  injury: 0  zwidth: 500
   itr_end:
<frame_end>


Player 3
    DC-Code:
<frame> 321 Team
   pic: 141  state: 7  wait: 100  next: 323  dvx: 0  dvy: 0  centerx: 39  centery: 80  hit_a: 0  hit_d: 999  hit_j: 999
   sound: data\burntr.wav
   bdy:
      kind: 0  x: 21  y: 15  w: 63  h: 60
   bdy_end:
   itr:
      kind: 8  x: -450  y: -10960  w: 950  h: 100  dvx: 326  injury: 0  zwidth: 500
   itr_end:
   opoint:
      kind: 1  x: 52  y: -40  action: 322  dvx: 0  dvy: 0  oid: 7  facing: 0
   opoint_end:
<frame_end>
<frame> 322 Team
   pic: 999  state: 7  wait: 150  next: 1000  dvx: 550  dvy: 550  centerx: 39  centery: 80  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 8  x: -250  y: -10750  w: 900  h: 100  dvx: 324  injury: 0  zwidth: 500
   itr_end:   
<frame_end>
<frame> 325 Team
   pic: 999  state: 3  wait: 100  next: 1000  dvx: 550  dvy: 550  centerx: 38  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
   bdy:
      kind: 0  x: -250  y: -10900  w: 900  h: 100
   bdy_end:
   bdy:
      kind: 0  x: -250  y: -10910  w: 900  h: 100
   bdy_end:
<frame_end>


Player 4
    DC-Code:
<frame> 254 Team
   pic: 96  state: 7  wait: 100  next: 255  dvx: 0  dvy: 0  centerx: 44  centery: 91  hit_a: 0  hit_d: 999  hit_j: 999
   sound: data\Suwatr.wav
   bdy:
      kind: 0  x: 19  y: 19  w: 64  h: 75
   bdy_end:
   bdy:
      kind: 0  x: -400  y: -10800  w: 900  h: 20
   bdy_end:    
   itr:
      kind: 8  x: -450  y: -10960  w: 950  h: 100  dvx: 256  injury: 0  zwidth: 500
   itr_end:
<frame_end>


Ball
    DC-Code:
<frame> 300 Finder1-
   pic: 6  state: 3005  wait: 150  next: 350  dvx: 0  dvy: 0  centerx: 215  centery: 230  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 8  x: -250  y: -10655  w: 900  h: 50  dvx: 301  injury: 0  zwidth: 500
   itr_end:   
<frame_end>
 
<frame> 301 Finder1-2
   pic: 6  state: 3005  wait: 150  next: 350  dvx: 0  dvy: 0  centerx: 215  centery: 230  hit_a: 0  hit_d: 0  hit_j: 0
   itr:
      kind: 8  x: -250  y: -10455  w: 900  h: 130  dvx: 304  injury: 0  zwidth: 500
   itr_end:   
<frame_end>
 
<frame> 304 TeamUp
   pic: 6  state: 3005  wait: 3  next: 305  dvx: 0  dvy: 0  centerx: 215  centery: 230  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 305 TeamUp
   pic: 6  state: 3005  wait: 150  next: 350  dvx: 0  dvy: 0  centerx: 215  centery: 230  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 157  y: 89  action: 325  dvx: 0  dvy: 0  oid: 7  facing: 0
   opoint_end:
<frame_end>
And Then Will There Be None?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)