I'm failling to find answers elsewhere; can I say...
if MyRef.Playgroup Open 1 == 1
... or is there another way to find out a ref's current playgroup animation? I only ask if that works because after trying a few things, that was the only line of scripting that DIDN'T return an error message, and it runs in the game, but it's not doing what I want it to do, but I can't tell if that line is what's wrong or something else.
Any help is appreciated, as always! Thanks.
--------------------------------------------------------------
[EDIT:] Alright, what I'm TRYING to do is have a switch that activates a door (simple), but I want a Klaxon light that flashes when the door is OPENING, OPEN and CLOSING, but not when it's closed.
So one thing I'm wondering is how to script two animations in a row; the Klaxon light has three animations:
Forward......the light quickly fades in from off to on.
Left............the flashing light loop (on).
Backward...the light fades out slowly from on to off.
I can't figure out how to play the forward animation + wait for it to finish (albeit only 1/10th of a second) + play the left animation in a loop.
My next problem is stopping the Klaxon when the door is shut. I can't run a simple OnActivate with the switch, because that would stop the light when the door starts closing, but because I'm picking and want to expand my knowledge as usual, I want it to stop flashing when the door is done closing.
To further complicate things, I'd love it if I could (what else) get the light to play the backward animation as the door reaches the closed state, ending with it off (no animation).
This is the closest I've come in scripting after talking to a few friends and Willie's help here in this thread:
Begin GameMode If (rLight.IsAnimPlaying) && (rDoor.GetOpenState == 3) rLight.PlayGroup backward 1 rGlow.PlayGroup backward 1 EndIfEnd
rDoor = the door
rLight = the klaxon light object
rGlow = the klaxon light marker
My new problem is that, yes, this runs when the door is shut & light is animating, but because it's a Begin GameMode script it runs every frame of game play, so when it starts the backward animation on the light and glow, in the next frame it runs the script again, realizes that the backward animation (IsAnimPlaying) is playing and restarts the script, leaving the light in a strange looking perpetual fade out state.
Firstly, the simpler answer, I know how to script an animation (Playgroup) but how do I script it to stop animating? Playgroup 0?
Secondly, the more fun answer. Hopefully what I'm asking makes sense at this point. How do I tweak the above script to play the backward animation on the light & glow ONCE, effectively keeping the light off exclusively when the door is closed?
I LOVE THIS FORUM! Thanks to anyone who can help. You don't have to know all about this to help, anything can be useful. ^_^