Scripts / [SOLVED] 3rd person shift to 1st person

Author
Message
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 8th May 2019 10:06
Hi,
Is it possible via scripting to switch between 3rd and 1st person perspective in GameGuru?

I would like to be able to walk around in 3rd person perspective and then at certain points (say closeup examining a desk drawer) in the game to auto switch to 1st person perspective. Then when I walk away from that point it turns back to 3rd person perspective?

Is this possible??
Sorry I am only starting to learn LUA scripting and more of a game designer and visuals type of person. Any help would be appreciated

The author of this post has marked a post as an answer.

Go to answer
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 8th May 2019 12:41
Im guessing it can be kind of faked via scripting like Amenmoses has done with his trucks.
They switch from third person to inside the cab in first person … Not the same I know but I bet the same sort of thing could be done with third person character views ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 8th May 2019 19:48
Just hide the 3rd person character and control the camera directly, first person is basically just a camera anyhow.
Been there, done that, got all the T-Shirts!
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 8th May 2019 20:13 Edited at: 8th May 2019 20:30
Posted: 23rd Oct 2017 17:12
It is possible i was playing with it in the beta release in 2017.
You need to modify gameplayercontrol.lua. for it to work.
I lost all my work about a year ago, So im having to redo everything i had done, ill add this one to the list, but it might take a while,

Desktop: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, Windows 10 Pro, 64-bit, 16 GB Ram, ASASUS Geforce TURBO GTX1080 8GB, 34" 21:9 2560x1080 Full HD UltraWide IPS Monitor

[RIP] Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
PT V9.0 3DMark=377, Passmark=1222.
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 9th May 2019 13:30
This is just what i need perelect.

Do you have the script or will you need to re-write it??

Many thanks for your help on this!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 9th May 2019 16:39 Edited at: 9th May 2019 16:42
GG already actually makes swapping between third and first person super easy - no need to edit any core files, just start in third person (so GG will set up the third person camera and character etc) then you can easily swap with the SetGamePlayerControlThirdpersonEnabled() command & a little bit of extra code to make it cleaner.
i attached a file that you can assign to an always active object which will let you swap back and forth via pressing E in game


sorry for the quick changes in the middle of the video, i was just showing it can be swapped repeatedly & instantly with no issues
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
SOLO DESIGN
16
Years of Service
User Offline
Joined: 30th Jul 2008
Location: Kent, England
Posted: 9th May 2019 19:47
This post has been marked by the post author as the answer.
Great smallg!! this is great!

Many thanks
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 9th May 2019 20:17
Thanks smallg
It works great.
I remember when it was first released in beta it didnt carry over sounds, health, weapons, etc between switching so lee has rewritten it, to make it so it does.

The other option i was working on back then, was to swap between TPV characters, so you could swap from a "Wizard" to a "Wizard Evil" in TPV.
hint,hint,

cheers

Desktop: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz, Windows 10 Pro, 64-bit, 16 GB Ram, ASASUS Geforce TURBO GTX1080 8GB, 34" 21:9 2560x1080 Full HD UltraWide IPS Monitor

[RIP] Laptop: Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
PT V9.0 3DMark=377, Passmark=1222.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 10th May 2019 01:19
Excellent thanks smallg.
Been wanting this myself for a while ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 10th May 2019 01:33
Sweet. Thank you.
RIP
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

New:
Intel(R) Core(TM) i5-8400 CPU @ 2.81GHz, 12GB RAM, Nvidia gtx1050ti 4gb, Windows 10 Home 64bit, Screen resolution 1920 x 1080. System Passmark 3774




PCS
8
Years of Service
User Offline
Joined: 7th Jul 2016
Playing:
Posted: 15th May 2019 22:17
Thank you Smallg now i just have to get the third person walk , to walk up straight like the wizard on a normal character.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 16th May 2019 05:54
That will depend on the model, the way it walks is bow it's walk animation has been animated, if it doesn't have an upright walk animation it won't walk upright. I think most of the default characters have an upright walk, you just need to work out which frames it is on and change it in tbe fpe.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th May 2019 17:52
Nice one Smallg
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-11-17 16:36:53
Your offset time is: 2024-11-17 16:36:53