YesNoOk
avatar

Back Stab (Read 642 times)

Started by ShunpoHadouken, February 13, 2009, 05:12:04 pm
Share this topic:
Back Stab
#1  February 13, 2009, 05:12:04 pm
  • **
Is there a way to do a back stab...I dont have idea since its 2d...
Its like it makes your attack double damage when your opponent is not facing on you and in other word,when you attack him in the back?
Thanks.
Thanks For Any Help!!!
Re: Back Stab
#2  February 13, 2009, 05:18:42 pm
  • ******
  • [E]
    • Mexico

  • Online
you can try using facing triggers to call two different hitdefs.
Re: Back Stab
#3  February 13, 2009, 09:26:09 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
by default, characters auto turn to always face the oponent, therefore if you want to code a backstab you will have to override the autofacing.
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
Re: Back Stab
#4  February 13, 2009, 09:31:55 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
just do what [E] said, make it so when the opponent is not facing you a different hitdef activates

[mcode]facing[/mcode]
Re: Back Stab
#5  February 13, 2009, 10:45:52 pm
  • ******
by default, characters auto turn to always face the oponent, therefore if you want to code a backstab you will have to override the autofacing.
Not when the opponent is in the middle of a move and you sneak behind him.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Back Stab
#6  February 15, 2009, 11:23:24 am
  • **
by default, characters auto turn to always face the oponent, therefore if you want to code a backstab you will have to override the autofacing.

uh mm... How do I do that? Where do I disable it?
Thanks For Any Help!!!
Re: Back Stab
#7  February 15, 2009, 12:19:08 pm
  • *****
  • Hedgehog Whisperer
  • Red Bull addict
    • Spain
    • xgargoyle.mgbr.net
There are 2 ways to do it:

1) Check the details on StateDef in your cns documentation:

Quote
8. facep2

When you include the line "facep2 = 1", the player will be turned, if necessary, to face the opponent at the beginning of the state. "facep2" has the default value of "0" if omitted.

2) Using an AssertSpecial
Quote
    - noautoturn

      While asserted, keeps the character from automatically turning to face the opponent.
XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
Re: Back Stab
#8  February 15, 2009, 06:08:39 pm
  • ******
Uh... I think you're going in the wrong direction.
You want to have your power increase when you're hitting the opponent from behind, right ? Such a situation could occur when he's busy doing some move, and you jump/dash/teleport/dance behind him. You turn around, he's still in his own state so he doesn't turn around, you attack while you're behind him : that's an attack from the back.
Is that what you want to do ?

Simply use an AttackMulSet triggered when you're facing toward the opponent and he's facing away, turning his back on you - facing in the same direction as you are. That's "p2dist X >= 0 && enemynear,facing = facing".
There's nothing about you turning around or not. Just checking if the opponent is facing the wrong way. XGargoyle is describing a situation where you would be hitting someone who is behind you, so he has to go through making sure you can be put in such a situation - by removing autoturn.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: Back Stab
#9  February 16, 2009, 04:46:02 am
  • **
Oh Ok Ill really try it after I finish my homework...Thanks. :)
Thanks For Any Help!!!
Re: Back Stab
#10  February 18, 2009, 11:15:16 am
  • **
Simply use an AttackMulSet triggered when you're facing toward the opponent and he's facing away, turning his back on you - facing in the same direction as you are. That's "p2dist X >= 0 && enemynear,facing = facing".
There's nothing about you turning around or not. Just checking if the opponent is facing the wrong way. XGargoyle is describing a situation where you would be hitting someone who is behind you, so he has to go through making sure you can be put in such a situation - by removing autoturn.

Yey!!!  :D Thanks Byakko.
Have tried it. And it Works.
Thank you very much Byakko and everyone for help...

Thanks For Any Help!!!