Quantcast

Jump to content

» «
Photo

Melee fight

6 replies to this topic
Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013
  • Poland

#1

Posted 24 August 2013 - 06:04 AM

Hi people.
I just think about animations from melee combat.
There animations just stop when You hit something.
I just have ask - somebody know how it works? I do not remember with option of native give collision for animation. I think that is some AnimationFlag...

Thank You for reply.

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#2

Posted 24 August 2013 - 10:13 AM

Hi,
maybe I'm wrong but I think it's:
CODE
TaskPlayAnimNonInterruptable(Ped ped, const char *animName, const char *animGroup, 8.0f, 1, 0, 0, 0, -2)

The "1" is for repeat.
I know I have tried to hit a animated whore and she never stopped dancing... moto_whistle.gif but it's long time ago and I'm not sure now.

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013
  • Poland

#3

Posted 27 August 2013 - 02:37 PM

Okey but ...
I need animation to load collision of example - hand.
Like in melee fight. If You hit wall - animation stopped. I just want know that animation. sad.gif

Hover_Mode
  • Hover_Mode

    Playa

  • Members
  • Joined: 30 Jun 2013

#4

Posted 01 September 2013 - 02:20 AM

QUOTE (Michael Wojtanis @ Tuesday, Aug 27 2013, 14:37)
Okey but ...
I need animation to load collision of example - hand.
Like in melee fight. If You hit wall - animation stopped. I just want know that animation. sad.gif

could you explain it alittle better, you are wanting for an melee animation to stop once you have hit something yes?

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013
  • Poland

#5

Posted 03 September 2013 - 05:00 PM

Yes. You see, You will hit something and the animation is going... back. Just from that position to beginning.
I want find how it works.
I just found how to detec collision of hands... but how to make animation play back? I know about native call "get_anim_time" [from 0.00 to 1.00] but the backward animation...

julionib
  • julionib

    Coder

  • Feroci
  • Joined: 13 Sep 2012
  • Brazil

#6

Posted 03 September 2013 - 08:46 PM

to play the animation "backwards" you can set the anim time reducing the percent coeficient, for example:

CODE

for c as double = 1 to 0 step -0.01
    native call SET_CHAR_ANIM_CURRENT_TIME, required params..., c)
    wait(10)
next


in my anims tutorials you can find example of this native method use

the problem will be find the correct wait() or step to use to make it look like a real play

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013
  • Poland

#7

Posted 06 September 2013 - 06:45 PM

Hm... Okey. I will see what i can do.

Thanks everyone!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users