Quantcast

Jump to content

» «
Photo

Shoot and Aim during animations

5 replies to this topic
Twistedtwister
  • Twistedtwister

    Punk-ass Bitch

  • Members
  • Joined: 06 Oct 2011

#1

Posted 2 weeks ago Edited by Twistedtwister, 2 weeks ago.

First off, big thumbs up for the community! 
Without your guys tutorials etc I would never pick up animating and scripting.
Altough everything is new for me, it is great fun :)
 
I have been the last couple of weeks playing around with animations and a bit of scripting
I figured out how te import and export and to bind the custom animation on a key.
 
The problem at the moment I keep stumbling upon is that Iam not able to play the animation and shoot/aim at the same time.
I replaced the Swimming/Idle for my custom animation (a dodge move)
I tried also the Gun@deagle/Fire , but same result and on top of that my animation aint working right anymore.
I hope sombody got a solution for me, seeing it can be done in several max payne scripts.
 
 
Greetings 
Frank
 
 
Script that I use for the Animation (It is from JulioNIB one of his tutorials)
 
Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
 
If e.Key = Keys.NumPad0 Then
 
 
 
Dim Animset As GTA.AnimationSet
 
Dim Animname As String = "idle"
 
Animset = New AnimationSet("swimming")
 
Player.Character.Animation.Play(Animset, Animname, 8)
 
End If
 
End Sub

LetsPlayOrDy
  • LetsPlayOrDy

    Too fast for ya

  • Members
  • Joined: 24 Aug 2013
  • United-States

#2

Posted 2 weeks ago

It is possible to only play the animation in the upper body, and also walk while that animation is being played, but I do not believe it is possible to play an animation on your lower body only.


Twistedtwister
  • Twistedtwister

    Punk-ass Bitch

  • Members
  • Joined: 06 Oct 2011

#3

Posted 2 weeks ago Edited by Twistedtwister, 2 weeks ago.

Thanks for your reply LetsPlayOrDy!

I gonna give it a trie this evening/night :)

 

 

Edit:

So I thought well before I trie the upperbody animation trick.

Let`s get back to basics to see where it goes wrong.

 

I did the following.

Use the normal animations of Gta IV (Gun@Deagle , Fire)

Bind them under numpad 0 and play them. 

What happened was that you get the aiming animation , but the mouse aiming isnt working , and there is no sound/gun flash effect.

 

After that I tried the same with melee functions melee_player_unarmed.wad.

This resulted in playing the right animation but there was no collision.

 

 

So now my question is, do I need to script the collision,Sound,Gunflash effects myself?

Or did I missed a crucial part?

 

Greetings

Frank,


leftas
  • leftas

    C++ for hacks/mods, C# for everything else.

  • Members
  • Joined: 13 Jun 2013
  • Lithuania

#4

Posted 2 weeks ago Edited by leftas, 2 weeks ago.

*deleted*
InfamousSabre answer is better.

Best regards,
Paul.

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#5

Posted 2 weeks ago

You'll need to use animation flags to be able to control the horizontal aim during the animation. as for vertical aim, I'm not sure how this is done yet.  Normally, firing the weapon (sound, flash, bullet, ptfx, ammo reduction, etc) depends on the current animation time, and it's all handled internally of course. Melee is probably done the same way.

 

If you're using a drive-by animation, simply set the animation time to aim. there is no vertical aiming of the animation during drive-by's

  • leftas likes this

Twistedtwister
  • Twistedtwister

    Punk-ass Bitch

  • Members
  • Joined: 06 Oct 2011

#6

Posted 2 weeks ago Edited by Twistedtwister, 2 weeks ago.

Big thanks for the Help guys!

Gonna give the Animation Flags this evening a trie.

 

Bit of a update/progress 

Yesterday I have been just playing around a bit to learn more about scripting.

Inserted my custom animation again, applied a force to it when near/targetting a ped.

So for now I have a impact effect for my melee animations.

 

The only thing was that I still had no collision. 

So after bit of reading went true the object browser/native`s and found this one: GTA.World.TriggerCollisionsAt(GTA.Vector3)

Iam just wondering how I can make it that the collision is active on ped and player (still need to read a lot of info)

 

Edit:

 

Greetings,

Frank

 

 

ps: Cookie for Julio NIB , his tutorials are helping me a lot :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users