3rd Party Models/Media Chat / Changing perspective on animation frames

Author
Message
SOLO DESIGN
15
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 5th Nov 2019 15:46
Hi,
I was wondering if it was possible to change the players perspective depending on if a frame of animation was reached.

For example - Start game in 3rd perspective, Press right mouse button and the player model pulls out a gun, perspective changes to first perspective showing model of hands/gun. Pressing right mouse button again fires gun, Scrolling mouse button puts gun away and perspective changes back to 3rd perspective with gun holstered.

Basically changing perspective dependant on animation frame reached?

Many thanks all.
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 8th Nov 2019 02:11
Yes. Sure, no problem with the camera movement.
Just not sure on the animations part-- I am trying to learn how
to get animations myself. So maybe we can get some help!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th Nov 2019 10:44
GetAnimationFrame( e ) will give you the current animation frame for a model.
GetGamePlayerControlThirdpersonCharactere() will give you the entity Id of the third person character.
Been there, done that, got all the T-Shirts!
PM
SOLO DESIGN
15
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 11th Nov 2019 10:43
Hi Amenmoses,
Many thanks for the info, is there any chance you could do an example as I am very early on with Lua scripting and more akin to modeling and animating and graphical work.

I think this would be of some use to many here on the forums.
PM

Login to post a reply

Server time is: 2024-03-28 18:43:04
Your offset time is: 2024-03-28 18:43:04