Jump to content

RPG aiming


Xwad

Recommended Posts

Posted

Of course, you can use setElementVelocity to manipulate the velocity of the rocket.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

  • Moderators
Posted

Maybe possible with:

setWeaponProperty 

Using flags. You only know when you try.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

Yea, probably.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Thanks but i already tryed that. Its not good for me becaouse its repkacing mp5 .. and its a coded script so i cant change the id.. Can you make me pls ab example for that flag? Becaouse there is no example on the wiki for that flag:/

  • Moderators
Posted

Try this, I used to use flags, but doing it like this should be working too.

setWeaponProperty ( 35,"pro","flag_aim_arm",true)-- Rocket Launcher  
setWeaponProperty ( 36,"pro","flag_aim_arm",true)--Heat-Seeking RPG  
  

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

thanks. One more question. how can i set it to mp5 stance? I was looking for the answer on the inetrenet but there is nothing with flag_aim_arm:/

  • Moderators
Posted

That should probably be: "anim_group"

https://wiki.multitheftauto.com/wiki/GetWeaponProperty

But this is a get only property, MTA can't do it yet.

They(MTA team) didn't give this priority, so that's unfortunately.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

No i trying to change the tec 9 weapon shooting style(stance) to m4 shooting style but its wont work:(( pls help me somehow! I made thios script:

  
function stance() 
if weapon = 32 then 
setWeaponProperty ( 32,"pro","flag_aim_arm", true ) 
end 
addEventHandler( "onWeaponFire", root, stance ) 
  

  • Moderators
Posted

Remove everything, except line 4... No event needed, just that line.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

I already tryed that but the tec9 weapon shooting style is not chaning. And it will not work becaouse i didnt add the m4 id:/ What should i do now?

  • Moderators
Posted

You are talking nonsense... This has nothing to do with a M4 id.

setWeaponProperty ( 32,"pro","flag_aim_arm", true ) 
setWeaponProperty ( 32,"std","flag_aim_arm", true ) 
setWeaponProperty ( 32,"poor","flag_aim_arm", true ) 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

As I said before, you can't change the animation, because it is not supported. But you are not listening at all.

You can only change the aim method.

There is no specific stance for M4, there are multiple "flags" that you have to change in order to get that result.

And most of them are unavailable.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

but its here: "flag_aim_arm" - bool - Uses other arm for aiming

its says that its possible to change the aiming animation. It says it can be used an other weapon animation for aiming!

  • Moderators
Posted

This flag changes the way you aiming, which change partly how the animation must be. When those get changed, it will pick partly a default version of the animation. But this doesn't affect any specific information about this animation.

I can turn a tec9 to a way of shooting with an m4(or at least the camera). But I can't edit how this animation must look like.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted

Well I am not going to test it for you. I was able to do it in the past, but I can't remember which aim property's to turn on and off.

Try this time to turn flag_aim_arm off.

setWeaponProperty ( 32,"pro","flag_aim_arm", false ) 
setWeaponProperty ( 32,"std","flag_aim_arm", false ) 
setWeaponProperty ( 32,"poor","flag_aim_arm", false ) 
  

And if that doesn't work, try to disable/enable "flag_aim_free" etc. till you find the right combination.

And make sure those are correct:

setWeaponProperty ( 32,"pro","flag_move_and_aim", true ) 
setWeaponProperty ( 32,"std","flag_move_and_aim", true ) 
setWeaponProperty ( 32,"poor","flag_move_and_aim", true ) 
  
setWeaponProperty ( 32,"pro","flag_move_and_shoot", true ) 
setWeaponProperty ( 32,"std","flag_move_and_shoot", true ) 
setWeaponProperty ( 32,"poor","flag_move_and_shoot", true ) 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • 5 months later...

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...