Scripts / New animation for thirdperson.

Author
Message
Bikay
User Banned
Posted: 16th Jun 2016 16:36
Hey guys,
I have rigged a wizard character of gameguru in fragmotion with new animation and I want to add animation for thirdperson in gameguru.so can anyone show me a small procedure on Lua script to animate when I press key (not WASD).
I have attach video and rigged file.I hope you guys will try and help me.


Thanks.

Attachments

Login to view attachments
wermer
8
Years of Service
User Offline
Joined: 18th Sep 2015
Location:
Posted: 16th Jun 2016 20:05
Where did you steal those animations from?

Broadcast #21 : Controlling Character Animation
https://www.youtube.com/watch?v=ecBPaiFKONk

Broadcast #43 : A Refresh Look At Animation
https://www.youtube.com/watch?v=0wiBdH5QOhE

I haven't used this at all so other people here can give you a proper answer, but here is a guess at what the some of the LUA might look like:

if g_Scancode == your key's scancode then
StopAnimaton(e)
SetAnimationFrames(e,your start frame,your end frame)
LoopAnimation(e)
do stuff related to the animaton
end



Windows 10 Home 64-bit / Intel i5 2500k @ 4.4Ghz + Asetek 510LC / Intel DP67DE / Intel 530 Series 240GB SSD / 16GB Kingston KVR 1333 / XFX Radeon R9 380X / Corsair TX 650 / Antec 300
PM
Bikay
User Banned
Posted: 17th Jun 2016 15:48
Hi Wermer, as you said I tried with the default wizard character but its not working.Even I tried putting g_keyPressH == 1 thats also same.I want to control character with keyboard keys as 3rd person not as when a player reach near character it animate.
In Fpsc I can control 3rd person with keys but in gameguru I find very hard to understand.Anyways below is the script I tried..I might make mistake so you guys please correct it.

if g_ScancodeH == 1 then
StopAnimaton(e)
SetAnimationFrames(e,872,878)
LoopAnimation(e)
end

If anyone could show me with a small video then it would be very helpfull.

Thank you.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 17th Jun 2016 15:59 Edited at: 26th Jun 2016 21:00
If you're trying to do this by adding it to a script on the wizard then I don't think it will work, as far as I know the characters don't use scripts when they're third person. You will have to add the script to another always active, dynamic entity and then change the script to reference the character.

for example (and i'm not sure if this will work i'm just guessing), if the wizard you placed is entity number 2 (the second entity you placed) then you would need to change the script to:

if g_Scancode == 35 then
StopAnimaton(2)
SetAnimationFrames(2,872,878)
LoopAnimation(2)
end

that's how i'm guessing you would do it, but there's plenty of scripters out there who know it better than me and will lilely tell me i'm wrong.

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Bikay
User Banned
Posted: 17th Jun 2016 19:05
Thanks belidos for ur idea,Yeah I hope someone comes up with video tutorial ,unless I watch a video tutorial I won't because it goes off my head ya.Actually I created a script inside I added this lines under thirdperson main(e)
================
if g_ScancodeH == 1 then
StopAnimaton(e)
SetAnimationFrames(e,872,878)
LoopAnimation(e)
end
==========:
In the editor map I hv place only playerstart n wizard character .Inside wizard.fpe,main I have added my lua script(Ai_main=thirdperson.Lua).

I will be trying as u said belidos till den i hope someone comes up with better n accurate tutorial which works for thirdperson.

Thanks.

wermer
8
Years of Service
User Offline
Joined: 18th Sep 2015
Location:
Posted: 17th Jun 2016 19:40 Edited at: 17th Jun 2016 19:41
I'm not really up to date on 3rd person controls in GG, and I'm not sure exactly what you are trying to do. Your 'if' statement with 'g_ScancodeH' wont work.

Watch broadcast 21 again - it touches on scancodes, and proper use of g_Scancode(around 10:00). You will gain many insights by watching all the videos as they often explain more than the titles imply. You can google a scancode list or check them inside the engine as mentioned in the video.

Broadcast #21 : Controlling Character Animation
https://www.youtube.com/watch?v=ecBPaiFKONk

AFAIK there is no global called g_ScancodeH.

if g_ScancodeH == 1 then <--- WRONG
if g_Scancode == 35 then <--- CORRECT
if g_KeyPressedE == 1 then <--- CORRECT

if g_Scancode == 35 then
StopAnimaton(e)
SetAnimationFrames(e,872,878)
LoopAnimation(e)
end

Good luck with your project.
Windows 10 Home 64-bit / Intel i5 2500k @ 4.4Ghz + Asetek 510LC / Intel DP67DE / Intel 530 Series 240GB SSD / 16GB Kingston KVR 1333 / XFX Radeon R9 380X / Corsair TX 650 / Antec 300
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 18th Jun 2016 07:22
If this helps , here is a list of scancodes (not fully complete but almost ):



Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.
Bikay
User Banned
Posted: 19th Jun 2016 11:11
I really want to thanks wermer,belidos and bored of the rings who cameforward and help me in my project.I really appreciate you guys.
Only on sunday I get free otherday I used to be busy in my office work so today I tried with my new animations with the help of you guys and I succeeded so am very happy.
Here is my small test video...

Thanks.

Attachments

Login to view attachments
Bikay
User Banned
Posted: 23rd Jun 2016 10:40
Again how do I make my thirdperson face toward camera...
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 23rd Jun 2016 13:22
RotateToPlayer(e)

i5, NV960 2GB, 16GB memory, 2x 2TB Hybrid, Win10.
i3 , Intel integrated graphics, 6GB memory, 512GB Generic SATAIII Win8.1.
Intel Celeron (duel Core), Radeon integrated graphics, 4GB memory, 180gB Generic SATAII, WinVista.
Q6600, Intel integrated graphics, 8GB memory, 512GB Generic SATAII, Win7.
Bikay
User Banned
Posted: 25th Jun 2016 19:56
It works for npc character not for thirdperson.
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 26th Jun 2016 20:57
Quote: "Again how do I make my thirdperson face toward camera..."


Use parameter option "Run Mode" = Yes to get 3rd person to face camera when pressing S key.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.

Attachments

Login to view attachments
Bikay
User Banned
Posted: 28th Jun 2016 19:01
I dont see run mod.which version you are using ,am working on old version of gameguru v1.01 .

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 28th Jun 2016 19:18
@Bikay-I'm running the latest version 1.131
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.
Bikay
User Banned
Posted: 28th Jun 2016 19:31
Ok I don't have latest version I have v1.12 but steam_api.dll missing ya.Anyways old Fpsc was better no issue but gamegure u need to install steam apps.I don't have so much idea ya.If somebody can give me steam missing file then how nice it would be

Thanks.
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 28th Jun 2016 19:41 Edited at: 28th Jun 2016 19:48
Quote: "Ok I don't have latest version I have v1.12 but steam_api.dll missing ya.Anyways old Fpsc was better no issue but gamegure u need to install steam apps.I don't have so much idea ya.If somebody can give me steam missing file then how nice it would be

Thanks."


A steam file missing and version 1.12 ..... it should have automatically updated ?
Are you running a genuine version ?

GameGuru wont normally run without that file on or offline ..
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Wolf
Forum Support
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 28th Jun 2016 19:49
Quote: "Ok I don't have latest version I have v1.12 but steam_api.dll missing ya.Anyways old Fpsc was better no issue but gamegure u need to install steam apps.I don't have so much idea ya.If somebody can give me steam missing file then how nice it would be"

ya know, old FPSC still available, even for free.
But if ya wanna use da Guru, ya better get legit version.
Anyway, since I'm that much of a nice person, you can DL the DLL attached...maybe it even works. Dunno

See ya



-Wolf
"When I contradict myself, I am telling the truth"
"absurdity has become necessity"

Attachments

Login to view attachments
Mariokiki
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location:
Posted: 28th Jun 2016 23:35
LoL !!

Nice Wolf !

PM
Bikay
User Banned
Posted: 29th Jun 2016 04:24
Thanks wolf for your kindness,I hope you make great success in ur life.And be always kind.

Login to post a reply

Server time is: 2024-05-04 16:31:12
Your offset time is: 2024-05-04 16:31:12