Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Shoot and Aim during animations


Twistedtwister
 Share

Recommended Posts

Twistedtwister
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 [email protected]/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
Edited by Twistedtwister
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Twistedtwister

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 ([email protected] , 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,

Edited by Twistedtwister
Link to comment
Share on other sites

*deleted*

InfamousSabre answer is better.

 

Best regards,

Paul.

Edited by leftas
Link to comment
Share on other sites

InfamousSabre

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

Link to comment
Share on other sites

Twistedtwister

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 :)

Edited by Twistedtwister
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.