03-07-2015, 03:56 AM
Hey there! I have a question regarding Gobos and the HPL engine timer.
I'm trying to use an animated gobo for a scare; it's supposed to cast a moving shadow on a wall opposite the player. Problem is, whenever I hit the trigger that's supposed to start the animation, the animation seems to start at a random frame each time.
It doesn't look like I can control the animation directly. In order to "start" it, I have two spotlights in the exact same position, the first one casting the first frame as a static gobo, and the second, which actually handles the animation, is disabled by default. When the player activates a trigger, the first spotlight is disabled, and the second is enabled. That way, the animation doesn't start until the player gets to the area I want them at.
As I mentioned, though, the animation starts at different points each time. My guess is that animated gobos are updated even if their lights are disabled, so it's completely dependent on the engine's current time.
My question is: is there a way for me to get the engine's current time, so that I can pass that to a timer function? Or is there a way for me to set the animation frame/time in Angelfire that I'm neglecting?
Thanks for your help!
I'm trying to use an animated gobo for a scare; it's supposed to cast a moving shadow on a wall opposite the player. Problem is, whenever I hit the trigger that's supposed to start the animation, the animation seems to start at a random frame each time.
It doesn't look like I can control the animation directly. In order to "start" it, I have two spotlights in the exact same position, the first one casting the first frame as a static gobo, and the second, which actually handles the animation, is disabled by default. When the player activates a trigger, the first spotlight is disabled, and the second is enabled. That way, the animation doesn't start until the player gets to the area I want them at.
As I mentioned, though, the animation starts at different points each time. My guess is that animated gobos are updated even if their lights are disabled, so it's completely dependent on the engine's current time.
My question is: is there a way for me to get the engine's current time, so that I can pass that to a timer function? Or is there a way for me to set the animation frame/time in Angelfire that I'm neglecting?
Thanks for your help!