Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 128
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: A question about slamming  (Read 2429 times)

0 Members and 1 Guest are viewing this topic.

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
A question about slamming
« on: May 16, 2011, 02:48:04 pm »
Sometimes I want my player to be able to grab the enemy it wants to slam, jump up with it and slam it down. I've managed to do this but I did it by perfectly timing the frames and it still looks sloppy. The thing is when my player lands on the ground I need it to slam the enemy at the same time. I tried using jumpframe and landframe but the enemy remained bined to the player. Does anyone have any suggestions?

A good example is I think Hagger does a move like this where he spins around and slams the enemy on the ground. It would also be useful since i'll be working with his character in the future.
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #1 on: May 16, 2011, 07:22:51 pm »
Quote
I tried using jumpframe and landframe but the enemy remained bined to the player. Does anyone have any suggestions?

 Well, simply unbind the enemy AFTER landing.
 Anyways, how does the whole animation look like?
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Re: A question about slamming
« Reply #2 on: May 16, 2011, 07:49:15 pm »
Here is the animation. I put Depost in the landframe but the enemy stayed binded.

anim grabattack
        loop   0
   delay   6
   offset   58 97
   @cmd slamstart2
   @cmd position 1 64 3 1 1
   jumpframe 4 5 2 0
   landframe 9
   frame   data/chars/Rogue/Rogue20000063.gif
      offset  59  101
   @cmd position 1 51 6 1 1
   frame   data/chars/Rogue/Rogue20000064.gif
      offset  59  98
   @cmd position 1 50 7 1 1
   frame   data/chars/Rogue/Rogue20000065.gif
      offset  25  94
   @cmd position 1 45 -10 1 1
   @cmd leaper 2 5 0
   frame   data/chars/Rogue/Rogue20000066.gif
      offset  25  85
   @cmd position 1 49 -14 1 1
   frame   data/chars/Rogue/Rogue20000067.gif
      offset  25  80
   @cmd position 1 41 -9 1 1
   frame   data/chars/Rogue/Rogue20000068.gif
   delay   1000
      offset  34  78
   @cmd position 1 36 -15 1 1
   frame   data/chars/Rogue/Rogue20000069.gif
      offset  34  86
   @cmd position 1 36 -15 1 1
   frame   data/chars/Rogue/Rogue20000070.gif
   @cmd    depost 1
   @cmd throw 35 1 0 -5 0 0
   @cmd clearL
   frame   data/chars/Rogue/Rogue20000070.gif
   frame   data/chars/Rogue/Rogue20000070.gif
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #3 on: May 17, 2011, 06:42:10 pm »
 You set wrong frame for landing frame. The frame in which depost and throw are set is 9th frame but you set landframe to 10th frame. Try fixing it to landframe 8.

 BTW is this move a throw or slam? I asked cause you set throw instead of finish.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline imaninja1991

  • Sr. Member
  • ****
  • Posts: 422
Re: A question about slamming
« Reply #4 on: May 17, 2011, 07:36:33 pm »
Works great, I thought landframe followed the order 1 2 3, not 0 1 2, explains why I had problems with fall in the past. Thanks bloodbane.  :cheers!:
« Last Edit: May 17, 2011, 07:54:37 pm by imaninja1991 »
Current Projects:
Super Mega Beatdown volume 2(in progress)Final Fight X Battletoads volume 2(in progress)

Offline Goliath

  • Jr. Member
  • **
  • Posts: 68
Re: A question about slamming
« Reply #5 on: August 14, 2012, 11:32:11 am »
I'm trying to make a slam throw but canīt figure out how the scripts work, here is the code:

Code: [Select]
Haggar:

anim freespecial1
delay 1
offset 34 83
jumpframe 1 2 -1 0
landframe 4
attackone 0
frame data/chars/haggar/dtrw00.png
delay 9
@cmd anti
@cmd bind 1 30 0 0 -1
@cmd slamstart
frame data/chars/haggar/dtrw00.png
@cmd position 3 0 0 1 -1
frame data/chars/haggar/dtrw01.png
delay 1000
frame data/chars/haggar/dtrw02.png
delay 9
@cmd position 4 0 0 1 -1
@cmd depost 0
@cmd finish 25 3 0 0 0 0
@cmd bind 0 0 0 0 0
frame data/chars/haggar/dtrw02.png

---------------------------------------------------------------------------------------
Scripts:

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
   }
}

void position(int Frame, float dx, float dy, float dz, int face)
{ // Modify grabbed entity's position relative to grabber
   void self = getlocalvar("self");
   void target = getlocalvar("Target" + self);

   if(target==NULL())
   {
     target = getentityproperty(self, "grabbing");
     setlocalvar("Target" + self, target);
   }
   if(target!=NULL())
   {
     updateframe(target, Frame);
     bindentity(target, self, dx, dz, dy, face, 0);
   }
}
---------------------------------------------------------------------------------------
Opponent:

anim fall7
delay 1000
offset 53 88
frame data/chars/moku/fall1.png
frame data/chars/moku/fall2.png
frame data/chars/moku/updown.png
frame data/chars/moku/updown2.png
frame data/chars/moku/pain.png
frame data/chars/moku/pain2.png

and this is the result
Spoiler
-_- any help?

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #6 on: August 16, 2012, 12:24:59 am »
 I don't know what's wrong with your slam. The clip ended before slam ends so I can't tell anything.

 Also I don't know where you get the scripts. Some functions aren't supposed to be declared together (they come from different coders), mostly because it's redundant.

 So before we start, where did you get the script? :)
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline Goliath

  • Jr. Member
  • **
  • Posts: 68
Re: A question about slamming
« Reply #7 on: August 16, 2012, 06:57:55 am »
If i donīt remember wrong, those two and bind were from the Scripted Slam/Throw thread http://lavalit.com:8080/index.php/topic,1440.msg18829.html#msg18829 and the others from Crime Buster.

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #8 on: August 18, 2012, 01:50:18 am »
 That thread is very very old.

 TBH, I'm not sure to give you scripts from Crime Buster v2.5. I rather support Damon Caskey's new system instead. But too bad Grapple editor is nowhere to be found :(.

 Anyways, back to topic, if you want to learn how to implement slam, find an example to learn from. Slam is pretty complex (nowhere near level up system though).
 For example:

Maxima Suplex
Quote
anim grabbackward
   delay   1
   offset   82 115
   frame   data/chars/maxima/throw001.gif
   delay   15
        @cmd    slamstart
        @cmd    position 0 20 25 -1 1
   frame   data/chars/maxima/throw001.gif
   delay   5
        @cmd    position 1 -16 35 -1 1
        sound   data/chars/maxima/suplex.wav
   frame   data/chars/maxima/throw002.gif
        @cmd    position 2 -41 53 -1 1
   frame   data/chars/maxima/throw003.gif
   delay   10
        @cmd    position 6 -84 2 -1 1
   frame   data/chars/maxima/throw004.gif
   delay   10
   frame   data/chars/maxima/throw004.gif
   delay   5
        @cmd    depost 0
        @cmd    finish 45 2 -2 2 0 0
   frame   data/chars/maxima/throw005.gif
   delay   8
   frame   data/chars/maxima/throw006.gif
   frame   data/chars/maxima/throw007.gif
   frame   data/chars/maxima/throw008.gif

(optional effects removed)

 1st to start slam, slamstart is declared. This function simply knocks down grabbed opponent putting him/her in right animation for next slam process.

 2nd, put opponent in desired position relative to slammer. That's why the function is simply named position. You need graphic reference to set this properly and you need to set opponent's FALL7 properly too. Let's talk about this later.

 3rd, repeat step #2 to simulate slamming process until you're done. Number of required frames depend on how detailed the slam would be.

 4th, at end of slam, opponent is released with depost. Then right after release, opponent is finished or thrown. The former is for slam while the latter is for throw.

 I'm talking in general for now. Do you understand the general idea here? :)
« Last Edit: September 02, 2012, 02:09:45 am by Bloodbane »
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline Goliath

  • Jr. Member
  • **
  • Posts: 68
Re: A question about slamming
« Reply #9 on: August 18, 2012, 10:45:02 am »
Do not worry, i already solved it

Spoiler

The problem was i put cancel in grab anim, so when the slamstart script checks for grabbed opponent is like there is nothing grabbed.  I realized that using the grabcheck script, very usefull. Once change the anim type everything worked like a clock, but thanks for the tips  ;)

Offtopic: you say we can only use up until 8 @cmd "caller" per anim, is that some kind of build limitation? or i have understand it wrong.  :dunce:

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #10 on: August 18, 2012, 11:00:33 am »
 Grabcheck script?

Quote
you say we can only use up until 8 @cmd "caller" per anim, is that some kind of build limitation? or i have understand it wrong.

 Yes, it is true. But it's hardly a problem since there's simple trick to overcome this. If this trick fails, we can just merge the functions in one function ;).
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline Goliath

  • Jr. Member
  • **
  • Posts: 68
Re: A question about slamming
« Reply #11 on: August 18, 2012, 11:11:53 am »
Grabcheck script?

Code: [Select]
void checkgrab(void target)
{ // Opponent Checker
// This script checks hero's current opponent. If he/she/it is biker, jetpack, special enemy or non-enemy entity this function returns 0
// Otherwise it returns 1.

    if(getentityproperty(target, "type") == openborconstant("TYPE_ENEMY")){
      char Tname = getentityproperty(target, "defaultname");

      if(Tname == "Badai" || Tname == "BikerL" || Tname == "BikerL1" || Tname == "BikerT" || Tname == "Rider" || Tname == "Rider2" )
      { // Normal Bikers
        return 0;
      } else if(Tname == "BikerS" || Tname == "Storm" || Tname == "BikerAT" || Tname == "Bikeman" || Tname == "BikeBoss" )
      { // Special Bikers
        return 0;
      } else if(Tname == "Biker" || Tname == "RiderB" || Tname == "BikerB" || Tname == "Rover" || Tname == "Candy" || Tname == "Button")
      { // Bonus Bikers, Candy & Dog
        return 0;
      } else if(Tname == "Skystar" || Tname == "Aerial" || Tname == "Raidi" || Tname == "Rockette" || Tname == "Jetpac" || Tname == "Rocket")
      { // Jetpacks
        return 0;
      } else {
        return 1;
      }
    } else {
      return 0;
    }
}

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #12 on: August 18, 2012, 11:33:17 am »
 Aww, you are solving with wrong script.
 Grabcheck is complement for air grab and running grab NOT for solving grab cancel. During grabbing state, there's no need for grabcheck at all since the grabbed opponent must be valid one. slamstart is used in this state.

 Or am I missing something here? :)
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline Goliath

  • Jr. Member
  • **
  • Posts: 68
Re: A question about slamming
« Reply #13 on: August 19, 2012, 06:24:47 am »
Then i just got lucky, by the way could you tell me at which build that feature was implemented?  :)

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: A question about slamming
« Reply #14 on: August 20, 2012, 09:19:18 am »
 I made this script years ago. I forgot which build cause I can't seem to find it here. But if you are asking for compatibility, it should be compatible with latest build.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal