logic bricks

By using the logic bricks,
I’ve learned to trigger a cube to move by clicking the left mouse button.
And it triggered the cube’s IPO from 1 to 100 frames under the Actuator.

Now I would like to have the other Cube’s IPO animation to be triggered at the end of that 100 frame. How do I do this? Please…

… you can’t exactly
you have to keep track of when you THINK the ipo animation will end, and at that time trigger the motion of the other object.

Timer properties and python (or expression controllers) can be useful for this.

If you know that 100 frames of an ipo will play in 4.0 seconds (it would be that way if the framerate was set to 25 fps), then you would store the starting time in one property (stored from the timer property) and start the animation of the other object when the timer property is past 4+your inital time

(somehow I want to explain this with pictures…)

I typed in something useful here before, and as a quirk of pressing the alternate menu key I lost it

you can’t tell when an ipo animation has completed

but you can predict when it will happen

a 100 frame ipo animation should play in 4.0 seconds, if the framerate in the display buttons is 25 (IIRC)

with that knowledge you can wait 4.0 seconds between starting one cube, and the other.

the way you would do this is to have an float type property to store the starting time of the first cube, and another property type time. When you start the first cube you set the float type property (name it what you want) to the timer type property. When the value of the timer type property is greater than the value of the float type property + 4.0 (or whatever the number of seconds your anim is) you trigger the whatever for the other cube.

simple really

Nope, the framerate setting only affects rendering to AVI files.

…other Cube’s IPO animation to be triggered at the end of that 100 frame…

Will it be possible in the future? :expressionless:

how would it be implemented? How would you wire things to get it to work?

[quote=“z3r0 d”]

how would it be implemented? How would you wire things to get it to work?[/quote]

Make a new sensor called frame sensor. It takes the name of the action or ipo actuator and you can set what frame you want. There will also be interval and change frame option. :slight_smile:

how would it be implemented? How would you wire things to get it to work?[/quote]Make a new sensor called frame sensor. It takes the name of the action or ipo actuator and you can set what frame you want. There will also be interval and change frame option. :)[/quote]
What if you have multiple ipo actuators?

Sounds great. I had hard time to have a better understanding of using a timer in general, is there a good tut somewhere to help me out?

how would it be implemented? How would you wire things to get it to work?[/quote]Make a new sensor called frame sensor. It takes the name of the action or ipo actuator and you can set what frame you want. There will also be interval and change frame option. :)[/quote]
What if you have multiple ipo actuators?[/quote]

I’m a bit confiuse about what you actualy mean. If you mean like to have multiple ipo actuators that all of them have to be detect by the frame sensor, just make multiple frame sensor and assign the name of each of the ipo actuator to each of the frame sensor. Then do the setting to each of them and connect them to AND controller.

if im reading this right, then it is possible, with TWO differnt ways of going about it
first way is python… if you dont want to use python, ill spare you the details =)

second way is good ole collision detection with logic bricks

the first cube has a 100 frame animation… well, stick a plane at the 100th frame of the cubes animation so the cube collides with the plane at frame 100… then either inter-connect the plane to the second cube, or send a message to the second cube

plane’s logic bricks would be:

when collide with ‘cube’ >> and >> send message “cube 2 go”

cube2’s logic bricks would be:

when recieve message “cube 2 go” >> and >> play ipo

edit::
heres a demo if you need one… i hope this is what you meant
www.zeroone.com/blengine/blends/coldet.zip

edit#2::
whoops!.. theres actually 3 ways of doing it, maybe more i dont know about too… anyhoo, the 3rd way is have the ipo played by a property… so when the anim property = 100, send a message out to cube 2 and make its ipo play

:smiley: :smiley:

just great!!

Thank you all! [!]