multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.37k stars 423 forks source link

Object animations #1977

Open xLuxy opened 3 years ago

xLuxy commented 3 years ago

Is your feature request related to a problem? Please describe.

I'm currently working on reversing GTA:SA's parachute implementation. I found the following lines:

9@ = Object.Create(#PARACHUTE, $TEMPVAR_X_COORD, $TEMPVAR_Y_COORD, $TEMPVAR_Z_COORD)

075A: set_object 9@ animation "PARA_OPEN_O" IFP_file "PARACHUTE" 1000.0 lockF 0 loop 1 // IF AND SET

which is applying an animation (in this case, block: PARACHUTE and anim PARA_OPEN_O

Describe the solution you'd like

In order to fully implement GTA:SA's default parachute system we'd need a way to set object animations. Therefore, a function like setObjectAnimation would be a nice idea.

Additional context

MegadreamsBE commented 3 years ago

This would also allow for #1769 if done well.