Scripts / Looping Animations

Author
Message
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Jan 2016 10:53 Edited at: 22nd Jan 2016 11:22
I'm going to be making some models soon that will have an animation that I need to loop, for example a hanging sign that swings back and forth.

To have it loop will I need to script it in the LUA? Or is it set in the FPE? And how do would I do it?

Also, before I start wasting my time creating the model, in Blender you can create a mode so that parts of it move when the model is moved, for example if you make a car model you can fix the wheels so that when placed in a game engine if you move the model forward the wheels automatically turn with no actual animation frames etc. Will these types of models work in GameGuru? ie if I was to make a car this way could I place it in GG and move it around using the move entity lua commands and would the wheels turn?
Johno 15
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 25th Aug 2014
Location: Cork, Ireland
Posted: 22nd Jan 2016 11:30
As far as I know you can use the LoopAnimation command in lua after setting the frames you would like to loop e.g



as far as your other question goes, I'm no modeler so I can't give you an answer on that
'Judge a man not by his answers. But by his questions.'
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd Jan 2016 12:02
for the first 1 it depends how you want the animation to play, if it's a constant loop (like a tree blowing in the wind) you can simply set playanimineditor = 1 in the .fpe to make is loop through the animation endlessly and then you dont need any script, if you want more control or more than 1 animation you will need to script it.

i would suggest doing a quick test for the 2nd question, maybe a simple box with some wheels?
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 22nd Jan 2016 12:08 Edited at: 22nd Jan 2016 12:09
Thanks SG, exactly the answer I was hoping for, all of the models I have planned are animated with simple animations that I want to loop as background fluff so if what you say works then that's perfect. I didn't realise that playanimineditor = 1 would make it animate all the time, I thought it was only in the editor/test modes.

As to the second one, I didn't really want to try it myself because it is a lot of work to set up even for a basic model like your suggestion, I was hoping someone would know, but i'll give it a try over the weekend.
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 22nd Jan 2016 15:18
Yes, let the engine do the animating. No script required for this kind of animation.
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

BadGibbon
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 14th Feb 2015
Location:
Posted: 22nd Jan 2016 20:45
Hi Guys

Just wanted to ask, if it is possible to run animations in reverse?

i.e. instead of say:
SetAnimationFrames(1, 100)
can you say:
SetAnimationFrames(100,1)

I thought I'd read it somewhere that it was, but it doesn't seem to work for me!
It would make life so much easier...

Thanks to anyone who can help.
PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 22nd Jan 2016 20:56
I think this was a function that Lee was going to add, in a future update. I do recall hearing him mention it. But it is not in the global.lua file yet.
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

BadGibbon
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 14th Feb 2015
Location:
Posted: 22nd Jan 2016 21:06
Greetings Pirate Myke

Thanks so much for your swift response and clarification of the situation.
I am most obliged, stops me banging my head against that proverbial brick wall.

I will now look forward to it being introduced.

Thanks again

BadGibbon
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd Jan 2016 21:18
Quote: "Just wanted to ask, if it is possible to run animations in reverse?"



https://forum.game-guru.com/thread/212794?page=2#msg2534397

Here's the post about this topic

Quote: "In the next update I have fixed a bug which now allows you to play animations in reverse by simply setting the speed to a negative number "
Desktop: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 CPUs), ~3.6GHz, Windows 8.1 64-bit, 16 GB Ram, NVIDIA GeForce GTX 750 Ti, Display Memory: 4018 MB. Resolution 1360x768, Passmark 3528.
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)
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 22nd Jan 2016 21:36
Thank you.
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

BadGibbon
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 14th Feb 2015
Location:
Posted: 22nd Jan 2016 21:40
Cheers perelect.
PM

Login to post a reply

Server time is: 2024-04-28 10:16:48
Your offset time is: 2024-04-28 10:16:48