sync to last frame of action.

Can I sync an event to the last frame of an action?
Sorry if it;s a stupidly simple question but to me it looks like a python thinngy again.

Glenn

I dont understand. But in the actions you can use the property to play just one frame.

So perhaps you can apply that along with whatever else you are trying to sync to?

yea it is really easy…
set your action to play in a loop…

Make a property to represent the animation frames…
and set your action actuator to the property function and the property name above
attach it to an AND and make another actuator for a property brick… set the property brick to add a +1 …

the animation should play now… it will play 1 frame, then add +1 to the property, and continue untill it gets to the maximum frames…

now make a property sensor to set to the last frame number of your animation. hook it to an AND controller, and to the event that you want to trigger… (sound effect, add a smoke poof or whatever…)… make the property sensor into an interval, and do your maximum frame number to 9999…or it simply will not work

to play the animation again, just set the frame property to 1 and it should start the cycle all over again…

this is just a simple example… you will want to make a way to turn that loop on and off so it is not constently ticking away (this will make the armature stuck in the last frame untill you either reset the counter, or an animation with a lower priority number gets assigned to be played)

it is nice doing animations with the Property feature!! you can control the speed that the frames get played… this will make so that you dont have to make special animations for walk,walk faster, walk fastest…
also great for vehicle tires :smiley: you can control how fast the rotation animation frames get played :smiley:

well, hope that helps…

or an animation with a lower priority number gets assigned to be played)

How are they prioritized? Which one comes first?

How can you tell?

Thanks very much for the super explanation.

Thanks very much Mmph.
I’ll give it a go as soon as I get a moment.

Glenn

Fantastic work as usual MMph.
Thanks.
It’s annoying that the only way to communicate between properties on different objects is through sending messages. it makes the work flow that much more complicated. (If that’s not the case, let me know :))

Glenn

It’s annoying that the only way to communicate between properties on different objects is through sending messages

You could also send messages through python with “GameLogic”. This is much easier and more stable. Here is a simple code using GameLogic to send data between two scenes.

The object in one scene has this code:

 
import GameLogic
cont = GameLogic.getCurrentController()
own = cont.getOwner() 
GameLogic.value = own.value

The object in the other scene will receive the data with this code:


import GameLogic
cont = GameLogic.getCurrentController()
own = cont.getOwner() 
own.value = GameLogic.value

How are they prioritized? Which one comes first?

How can you tell?

Thanks very much for the super explanation.

Sorry for the delay ititrx!

in the action actuator logic brick, there is a field labeled “Priority” on the bottom right of the brick.

the lower the number, the higher the priority…

to make it even more verbose,

the animation assigned to 0, will always play over the one assigned to 1 through 999999.

lower gets the “right of way” :slight_smile:

the field on the left of the logic brick labeled “Blending” is a dirty rotten trick… never enter any value in there, or your game will crash.

I think the blending thingie is there for either a feature called “bone blending”, or the number of frames one action will blend into another action if the animation state is changed in mid animation.

sounds like a cool feature, I have a strong feeling I am using it wrong, it seems like years ago, I was blending animations with this feature.

Thank you very much… hmmmm So if there are 8 ipos to play at the same time, they go by the priority.

I wonder why I never noticed this? Big Bah, bah,bah. Ever see a stupid movie called overboard? Thats where the bah bah bah bah comes from…

Wait, I cant find the priority blank? Maybe it is in the armature actuator and not the ipo one? Yeah, it in action and you said that. That calls for 3 more buh, buh, buhs.

Im going to bed.

I use the blending option and it doesn’t crash my machine. It seems to work. I’ll look into it and keep it in mind if the project starts going haywire and crashing.

Glenn