Blender Game Animation: Invisibility to Visibility

First off, I would like to say that I’m new to these forums and I’m sorry if I’m doing something wrong.

I am creating a student game and I’ve been trying to use the animation to juice up the experience. I want to have an object appear on frame one and disappear with frame two. Here’s what I did:

  1. Went to frame 1 and hovered over the eyeball and the camera in outliner and pressed “I” to keyframe it.
  2. Frame 2: Hovered over the now closed eyeball and the off camera and pressed “I”
  3. Set Start to 1 and End to 2.
  4. Went to game logic. Here’s the program:

KEY: R --> and --> Ping Pong Action, Start 1, End 2

In the action space, I placed the name of the animation. However, when I playtested this, it didn’t work! This also isn’t working for anything else that’s not location or rotation.

If you need to see my file, I’ll be glad to show you it. Please help! Thanks!:smiley:

I don’t think those (eyeball and camera) can be keyframed. You could always use the visibility actuator in the logic bricks to set your object visible or invisible.

Oh wait, duh. I don’t know why I didn’t think of that.


Alright, update. Here is my new game logic below. Is there a way I can fix up this logic so it doesn’t flash sometimes? What I mean is can I make it more smooth. If you need the file, let me know.

Better use states:

state “hiding”
always [Level] -> AND/OR -> visibility [disable visible]
visibility event -> AND/OR -> set state “showing”

state “showing”
always [Level] -> AND/OR -> visibility [enable visible]
hiding event -> AND/OR -> set state “hiding”

According to your description in post #1
the showing event is frame 1 and the hiding event is frame 2. Both can be measured by a delay sensor (two delay sensors).

Thanks Monster, I got it to work smoothly and can now proceed with updating my project! :slight_smile: