Product Chat / Animation Trigger

Author
Message
slender1200
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 4th Jul 2015
Location: home
Posted: 14th Sep 2016 16:03 Edited at: 14th Sep 2016 16:04
Hello everyone.
I am just wondering, can I make an animation play once? I have a entity that has a specific animation to play when activated by a trigger zone, and it should only play once, but the animation seems to loop over and over when activated. Is there a way to make it play once? If there is a way, how?
PM
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 14th Sep 2016 16:22
This twitch broadcast Lee did a short while ago should tell you what you need to know.

https://www.youtube.com/watch?v=6B6lefpnVN8

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.
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 15th Sep 2016 10:36
When you create your .fpe file for the animated entity you should put playanimineditor = 1 at the end of it. If you do this the animation will only play once when you want it to.
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 15th Sep 2016 11:03
Quote: "When you create your .fpe file for the animated entity you should put playanimineditor = 1 at the end of it. If you do this the animation will only play once when you want it to."


I'm pretty sure that's not how that fpe command works.

It's the command to set the initial idle animation of the entity.

playanimineditor = 1 plays the animation listed under "Anim0 = " in the fpe, in a loop continuously, unless overridden in the script.

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.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Sep 2016 11:55
Belidos is correct.

For your request simply open the script, find where it says
PlayAnimation(e)
And add
Destroy(e)
Right below it.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th Sep 2016 16:33
I thought that command was fairly explanatory playanimineditor= play anim in editor. So it plays in the editor, if set to 0 it doesn't play in the editor. This was to help with the editor speed, which as you know can get very creaky indeed. It wasn't intended to be used for in game animation.

@ smallg, that solution sounds wrong. Surely if you do that, the object will be removed instantly? I would add a simple flag to check if it has played or not myself.

In init
played=0

In main loop

If played==0 then
PlayAnimation(e)
played=1
end

Fairly easy for one off animations. You can also add more options so it plays when you want it to.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Belidos
3D Media Maker
8
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 15th Sep 2016 16:38
Quote: "I thought that command was fairly explanatory playanimineditor= play anim in editor. So it plays in the editor, if set to 0 it doesn't play in the editor. This was to help with the editor speed, which as you know can get very creaky indeed. It wasn't intended to be used for in game animation."


It's supposed to be exactly that, but it does not quite work like that. It also controls the idle in the test if you are not controlling an idle via LUA, ie: if you use that command in the FPE with an idle animation under "Anim0 =" but only give the entity a default.lua script, then it will loop the Anim0 animation in the test as well.

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.
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Sep 2016 18:37
Quote: "@ smallg, that solution sounds wrong. Surely if you do that, the object will be removed instantly? I would add a simple flag to check if it has played or not myself."

he's using a zone so it would destroy/remove the zone, same end result as your solution but easier to implement
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
TazMan
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 20th Jan 2011
Location: Worldwide Web
Posted: 15th Sep 2016 19:02
I am sorry if I confused anything by what I have said, I have had a bad couple of weeks.
HP Pavilion Laptop - AMD A8-4555M APU with Radeon(tm) HD Graphics - 1.6GHz, 8GB Memory, Windows 10 Home, 64-bit Operating System.

I've got something to say - It's better to burn out than fade away.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 15th Sep 2016 22:57 Edited at: 15th Sep 2016 23:03
Quote: "It's supposed to be exactly that, but it does not quite work like that"


Ah I see. Probably a bug then, it really should only apply to the editor. One to add to the list if it isn't already on the list

[/quote]he's using a zone so it would destroy/remove the zone, same end result as your solution but easier to implement.
Quote: "

I suppose it depends on how it is used. I use zones occasionally, but not often generally. Your right though that it is an easier solution overall, IF it doesn't delete it part way through the animation. I spend a lot of time tweaking this sort of thing to perfection, or as close as I can get Game Guru sometimes makes things difficult in that area.

Still trying to think of a good timer solution that will enable any PC to run things at the same speed. Not had much success though as yet Any thoughts on that would be welcome.

"
I am sorry if I confused anything by what I have said, I have had a bad couple of weeks[quote=]

I'm sure no one thinks you gave bad info here. Game Guru has many quirks and you could be quite correct for all I know. It certainly doesn't hurt checking an object's FPE file out to fix issues. Sometimes you need to change them to get things working correctly. Always useful info for new users.

I'm sure Slender1200 will get it sorted between us all.

Edit
Not quite sure what has happened to the quotes I'm sure you all get the idea.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.

Login to post a reply

Server time is: 2024-06-29 03:36:42
Your offset time is: 2024-06-29 03:36:42