Ultimate Double Dragon

Complete LOTDD - Now: Ultimate Double Dragon 3.0 (Final)

No permission to download
Project is completed.
Mr.Q! said:
Sup man.

You know I'm having issues with this attack animation which contains "cmd bind" it works pretty well, but if an enemy tries to attack me while I'm hitting another one, sometimes that other enemy will get binded and never released until I get hit. Even by having "attackone 1" in those attacks anims, they still get randomly attached to me.

Hey man!  :D
Well, in this case the issue is that you builded your grabbing system with just the @cmd bind and @cmd forceanim. The problem with them is they are only good for some very basic stuff. Instead you should have using Bloodbane's Grab/Slam script system which is taking care of such issues and more. There are a lot of tutorials about it in the forum  ;)

Mr.Q! said:
...
As you can see, they want you to get surrounded, attacking one at a time. Any ideas? Thanks in advance

Now about this.. i actually was looking for long time for an opportunity to talk about it. This because i always thought this is missing from OpenBOR overal (engine/games), but in my opinion it is a very important thing for beat 'em ups. I know that a GOOD AI bevhavior is one of the hardest/complex things to code, but i feel like the AI options we have on OpenBOR are very basic to near horrible.
That's okay, but for me the real "problem" is that the engine does not provide many code options  to make it easy to code this Queueing system. Or at least i think so. I hope i'm wrong on this  ???

Okay, now about to how to script this Queueing system, i found this:
https://gamedevelopment.tutsplus.com/tutorials/building-a-beat-em-up-in-game-makercombo-attacks-more-ai-and-health-pickups--cms-26471

Now this is not for OpenBOR but it is still very interesting to see how this Queueing system works and its logic and this maybe will help some people with good script knowledge to bring this AI behavior to OpenBOR.

I hope that will somehow help my friend :-\
 
Thanks for the info maggas :)

Wait a minute, you mean the Crime Busters 2.5 mod, or the slamstrows2.rar tutorial .PDF that can be downloaded in the scripts section? I'm confused, does this mean I would have to redo all those moves and animations from the scratch? Just read that .PDF and I have lots of doubts, dang, this is getting kinda stressful
 
Mr.Q! said:
Thanks for the info maggas :)

Wait a minute, you mean the Crime Busters 2.5 mod, or the slamstrows2.rar tutorial .PDF that can be downloaded in the scripts section? I'm confused, does this mean I would have to redo all those moves and animations from the scratch? Just read that .PDF and I have lots of doubts, dang, this is getting kinda stressful

The transition to that system should not be as hard as you think. For example, the values you gave the @cmd bind can be/remain the same on the @cmd position on Bloodbane's system. And instead the Forced follow30 anim from the @cmd forceanim the enemies will use/play a specific Fall # anim.

Sure this will still require some work but i can guarantee it will be worth the trouble! This because the problems you now have with your system are only the beginning. If you will continue using your system, once you will add more functions and moves on your enemies, then you will very soon start finding more and more problems down the road.
For example, later if the enemies will have some jumping/air moves, you will not wanna have certain moves to be able to grab enemies while inthe air. Or even the opposite. Or you will have certain enemies(like big guys) which should not get grabed at all. What will you do then?

So this is why the sooner you will make the transition to Bloodbane's system the better is for you, trust me!

By the way, i mean this from Crime Buster v2.5. I don't know about the pdf you mentioned, It may be the same but i can't say for sure. Actually this from Crime Buster is what everyone is using.

Edit: I checked this slamstrows2.PDF and yes, this is trying to explain Bloodbane's system .... but... Oh my! This looks more confusing than helpful to me. I would better suggest you to read topics like this: http://www.chronocrash.com/forum/index.php?topic=236.0
 
What I don't get in that system is how do you declare in you playable character anim info the anim that the enemy will perform
 
Mr.Q! said:
What I don't get in that system is how do you declare in you playable character anim info the anim that the enemy will perform

With only putting once this  @cmd    slamstart2 on the top of the first frame of the animation.

Here is how the @cmd    slamstart2 function will look on your animation script .c file:
Code:
void slamstart2()
{ // Slam Starter for nongrab slams
// Use finish or throw after using this
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "opponent");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7")); // Slam Starter
   }
}

As you can see on this code, this is damaging the enemy with the "ATK_NORMAL7". So this will force the enemy to play its fall 7 animation.
Now this fall animation will not serve as a regular fall animation. This animation will be the place to store all the reaction  frames of the enemy even for different grab moves. The frames for this fall animation can be set on any order you like. Then this animation will require to have a big delay like 3000 or something.

Here is an example of my:
anim fall7
      loop 0
      delay  3000
      offset 77 170
      frame data/chars/roper/pain3.gif
      frame data/chars/roper/pain4.gif
      frame data/chars/roper/pain5.gif
      frame data/chars/roper/pain6.gif
      frame data/chars/roper/fall07.gif
      frame data/chars/roper/fall08.gif
      frame data/chars/roper/fall05.gif
      frame data/chars/roper/fall06.gif
      frame data/chars/roper/rise0.gif
      frame data/chars/roper/pain7.gif
      frame data/chars/roper/pain8.gif
      offset 77 169
      frame data/chars/roper/grabed1.gif
      frame data/chars/roper/grabed2.gif
      frame data/chars/roper/grabed3.gif
      frame data/chars/roper/grabed4.gif
      frame data/chars/roper/grabed5.gif
      frame data/chars/roper/grabed6.gif
      frame data/chars/roper/grabed7.gif
      frame data/chars/roper/grabed8.gif
      frame data/chars/roper/grabed9.gif
      offset 77 170
      frame data/chars/roper/thb1.gif
      frame data/chars/roper/thb2.gif
      frame data/chars/roper/thb3.gif
      frame data/chars/roper/fall05.gif

Then instead of using the "@cmd    bind" on your grab move animation you will use the "@cmd    position". With it you will also be able to set which reaction frame should the enemy play from his fall 7 animation. Here is an example of my Billy's throw move: 

anim follow12
      loop 0
delay 8
      offset 77 170
      @cmd    slamstart2
      @cmd    position 0 91 1 -1 0
      frame data/chars/billy/grab1.gif
      @cmd    position 4 0 -1 -1 1
      frame data/chars/billy/th1.gif
      ...

The marked with red is where you set which reaction frame should the enemy play from his fall 7 animation.
 
I see, interesting

How this system prevents you from hitting 2 enemies at the same time though and having both of them being thrown/slammed? The found bug was while grabbing an enemy and also "attackone 1" in my anims info
 
Mr.Q! said:
I see, interesting

How this system prevents you from hitting 2 enemies at the same time though and having both of them being thrown/slammed? The found bug was while grabbing an enemy and also "attackone 1" in my anims info

This is happening because the next step is to add this    @cmd  clearL  on top of first frame on players idle animation. And here is its script function which you should include on your animationscript .c file:
Code:
void clearL()
{// Clears all local variables
     clearlocalvar();
}

So this will prevent it from happening.
 
been toying with this slamstart2 script, but whenever I throw an enemy it won't perform my desired fall animation, they just perform the default one, how can I set that?

EDIT: Nevermind, just figured that out, so I can have as many "anim fall" outcomes I want by just adding more lines to the script like this?

Code:
     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL12")); // 2nd Finisher
     }
 
O Ilusionista said:
You should NEVER do such thing. Or you defeat the propouse of using script.

Why? What is so wrong with it?
Is not the propouse of using script to have more freedom for more modifications and functionality on your game?

I don't want to argue with you but i really don't get what you mean and why is this wrong. By the way, how is your finisher function look like?
 
I don't get it, too.

Maggas you mean the code itself?  Excuse me if I'm wrong but by adding more lines to this like I said before, I can force my enemies to fall in a determinated way whenever I need them to, right?

Code:
void finish(int Damage, int Type, int x, int y, int z, int Face)
{ // Damage as slam or throw finisher
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);
   int SDir = getentityproperty(target,"direction");
   int MDir;

   if(Face==0){ // Same facing?
       MDir = SDir;
   }

   if(Face==1){ // Opposite facing?

     if(SDir==0){ // Facing left?
       MDir = 1;
     } else { MDir = 0;}
   }

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     int dir = getentityproperty(target,"direction"); //Get opponent's facing direction
     if(dir==0){ // Facing left?
       x = -x;
     }

     if(Type==1)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL")); // 1st Finisher
     }

     if(Type==2)
     {
       damageentity(target, self, Damage, 1, openborconstant("ATK_NORMAL12")); // 2nd Finisher
     }

     tossentity(target, y, x, z); // Toss opponent ;)
     changeentityproperty(target, "direction", MDir);
   }
}
 
Mr.Q! said:
.. Excuse me if I'm worng but by adding more lines to this like I said before, I can force my enemies to fall in a determinated way whenever I need them to, right?

Yes, right. You can add more lines there for different fall reactions as you need. About o Ilusionista, he maybe meant not to add like 100 more different Type/fall reactions or something  but i'm still not sure. He better explain by himself what he meant.
 
Why? What is so wrong with it?
Is not the propouse of using script to have more freedom for more modifications and functionality on your game?

yes, but the main idea of using script is to expand and OPTIMIZE what we have.

I Will try to make a tutorial about it this
weekend. I've customized a lot this scripted slam to make my own version, which works better.

You don't need many different animations, like the old authors did with many fall animations in the old days.
 
I don't think maggas knew about an optimized slams script from yours, though. If he knew, he would have suggested it to me from the start, so IDK, and the CrimeBusters slams work pretty well, I don't see the problem when it's about 5 fall anims at most. There's no need for me to keep filling the scripts folder with hundreds of functions for the kind of mods that I do, like, you know....Just punch guys and that's it, for example  ;D.

 
Let me try to clear some things here

@Ilu: I think you've mistaken Mr Q here. He was asking about how to expand throw for various falling enemy animation NOT asking about how to use multiple fall animations to make slams/throws

Mr.Q! said:
so I can have as many "anim fall" outcomes I want by just adding more lines to the script like this?

Yes, you can add more types by adding more lines in throw and finish function :) (the former is for throws while the latter is for slams)
 
Thanks Bloodbane. BTW I have solved this "2 binded enemies" bug I was having with the @cmd bind script by using maggas suggestion, now I never get that thing but what I'm getting is, I'm grabbing/slamming/tossing 1 of the 2, but even if my slam/hold starts from a grabbed enemy.

For instance, you can see here my enemy punch animation, then I spawned 2 enemies to see if I get the bug, then, I grab one of the enemies and wait for the other enemy to be next to us and tries to attack me. So, he starts his punching anim and then I start my custom attack with slamstart2 script and I think I'm releasing the grabbed one and start attacking the one who threw the punch.

Any clues anyone?

[attachment deleted by admin]
 
Mr.Q! said:

Don't worry this is normal. For performing a scripted slam while you grabbing someone first with the defaulte engine's grab system,  you should use this slamstart function:

void slamstart()
{ // Slam Starter
// Use finish after using this
  void self = getlocalvar("self");
  void target = getlocalvar("Target" + self);

  if(target==NULL())
  {
    target = getentityproperty(self, "grabbing");
    setlocalvar("Target" + self, target);
  }
  if(target!=NULL())
  {
    damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL7")); // Slam Starter
  }
}

The marked with red is the difference between the  slamstart and  slamstart2 functions  ;)
 
Oh nice, thanks a lot!

Edit: Whenever I use slamstart my enemy gets free to move, it won't happen with slamstart2, what am I missing?
 
Back
Top Bottom