Jump to content

Importing Custom Animations?


superrollo

Recommended Posts

Hi.

 

I've recently learned the world of motion tracking, and I can now create .bhv files (biped in 3ds max) of my animations.

 

I'm a machinima maker in GTA SA, and I'm trying to import my own animations into San Andreas, I know this is possible, and I have

that plugin for 3ds max that makes it possible to import/export DFF and IFP files, but I just need someone to tell me how it works exactly.

 

Thanks in advance!

 

-Rollo

Link to comment
Share on other sites

Save your animations as an .ifp file (which I suppose you've done already). Then put your animation files inside gta3.img

 

You then have to make a code which makes it possible to perform the animation in-game. This belongs in the coding section but I'll write a simple code for you.

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'MYANIM' :ANIM_104ED: load_animation "MYANIMATION" :ANIM_2wait 0 if and044B:   actor $PLAYER_ACTOR on_foot 0AB0:   key_pressed 56 else_jump @ANIM_2088A: actor $PLAYER_ACTOR perform_animation "MYANIMATION1" IFP_file "MYANIMATION" 10.0 loopA 0 lockX 1 lockY 1 lockF 0 limT -1 unknown 0 unknown 0 jump @ANIM_1 

 

 

If you are not familiar with coding, I'll try to explain the basics.

 

The "04ED: load_animation "MYANIMATION" opcode loads your "animation package" which contains all your animations. Replace the "MYANIMATION" with the name of your ifp file (probably ped.ifp or your new "animation package"

 

"0AB0: key_pressed 56" This opcode makes it so you have to press a certain key to trigger the animation, in this case "8" on the keyboard. You can find a list of all the keys inside sannybuilder help files (Sannybuilder\Help\CLEO 3 Code Library\Virtual Keycodes).

 

The "else_jump" opcode jumps back to before you pressed the key if it can't find input (keypress) and tries to read it again (however, won't suceed until you've pressed 8).

 

"088A: actor $PLAYER_ACTOR perform_animation "MYANIMATION1" IFP_file "MYANIMATION" 10.0 loopA 0 lockX 1 lockY 1 lockF 0 limT -1 unknown 0 unknown 0" makes CJ perform your chosen animation from chosen "animation package". Replace "MYANIMATION1" with animation name and "MYANIMATION" with the name of your "animation package"

 

It then jumps back to the start so you can perform the animation again by pressing the key again.

 

If you aren't familiar with coding, I suggest that you read some tutorials here on GTAF.

 

Here is Sannybuilder if you haven't installed already (needed to create scripts)

http://www.sannybuilder.com

 

And CLEO (needed to run cleo scripts like this one)

http://www.cleo.sannybuilder.com

 

hope it helped somewhat smile.gif

Link to comment
Share on other sites

Save your animations as an .ifp file (which I suppose you've done already). Then put your animation files inside gta3.img

 

You then have to make a code which makes it possible to perform the animation in-game. This belongs in the coding section but I'll write a simple code for you.

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'MYANIM' :ANIM_104ED: load_animation "MYANIMATION" :ANIM_2wait 0 if and044B:   actor $PLAYER_ACTOR on_foot 0AB0:   key_pressed 56 else_jump @ANIM_2088A: actor $PLAYER_ACTOR perform_animation "MYANIMATION1" IFP_file "MYANIMATION" 10.0 loopA 0 lockX 1 lockY 1 lockF 0 limT -1 unknown 0 unknown 0 jump @ANIM_1 

 

 

If you are not familiar with coding, I'll try to explain the basics.

 

The "04ED: load_animation "MYANIMATION" opcode loads your "animation package" which contains all your animations. Replace the "MYANIMATION" with the name of your ifp file (probably ped.ifp or your new "animation package"

 

"0AB0: key_pressed 56" This opcode makes it so you have to press a certain key to trigger the animation, in this case "8" on the keyboard. You can find a list of all the keys inside sannybuilder help files (Sannybuilder\Help\CLEO 3 Code Library\Virtual Keycodes).

 

The "else_jump" opcode jumps back to before you pressed the key if it can't find input (keypress) and tries to read it again (however, won't suceed until you've pressed 8).

 

"088A: actor $PLAYER_ACTOR perform_animation "MYANIMATION1" IFP_file "MYANIMATION" 10.0 loopA 0 lockX 1 lockY 1 lockF 0 limT -1 unknown 0 unknown 0" makes CJ perform your chosen animation from chosen "animation package". Replace "MYANIMATION1" with animation name and "MYANIMATION" with the name of your "animation package"

 

It then jumps back to the start so you can perform the animation again by pressing the key again.

 

If you aren't familiar with coding, I suggest that you read some tutorials here on GTAF.

 

Here is Sannybuilder if you haven't installed already (needed to create scripts)

http://www.sannybuilder.com

 

And CLEO (needed to run cleo scripts like this one)

http://www.cleo.sannybuilder.com

 

hope it helped somewhat smile.gif

I'm planning to use it in Sa-Mp, can I make just a command that activates it? I know how to make scripts in PAWNO (samp), but I don't know what to refer it to, also, it would be much easier for me to just overwrite an existing animation. How do I do this?

Link to comment
Share on other sites

Sorry mate but there is no way to do it via command line. You need to create a script which actives the animation. If it's too hard/complicated for you. Then send the animations to me and I'll see what I can do. Just hit me up with a pm if you're interested.

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
  • 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.