I am trying to make a cut scene where after a bool flag is set to true from a triger a red light starts to blink like an alarm situation. I have tried using the Object enable and Object visible actions but all i get is the light to be either blinking fast uncontrollably or the light to be there static even before the triger is activated. Any help?
Comments
Rather than having a custom script, you may be able to get what you need by making a Cutscene that runs in the background. Something like a Visible (off), Pause, Visible (on), Pause, Variable Check loop should do the trick.
This is why AC does not come with such a script. Instead it is better to disable individual components on an object, or remove it from view with the Object: Visibility or Object: Teleport Actions.
If your script is there to control a light, for example, your TurnOff function could instead be:
An integer variable can keep track of how many times you run a loop by increasing its value each time (Variable: Set) and seeing if it's reached a maximum value (Variable: Check).
Then again, it's also possible to just animate the light's enabled state / intensity with Unity's standard Animator system. AC can control the playback of Animator components with the Object: Animate Action. With that technique, you wouldn't need to use the LightSwitch nor have a looping ActionList to turn it on/off in a cycle, as that would be all controlled through animation.