- Joined
- May 3, 2008
- Messages
- 3,154
Create precise timing cinematic using real variable
Creating cinematic using real instead of countdown timer are efficient and less time consuming. Real are also quite accurate just like countdown timer does and easier to organize.
First of all, create a Initialization trigger.
-
Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Set Execution_Order = 0
- Trigger - Run Execution Order <gen> (ignoring conditions)
-
Events
-
Gametime 0 Initialization
-
Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
-
Actions
- Set Execution_Order = 0
- Trigger - Run Next Trigger <gen> (ignoring conditions)
-
Events
If you do not reset it back to 0, it would skip the earliest trigger action of your cinematic.
This are also another trigger setup you cannot miss.
-
Trigger Active
- Events
- Conditions
-
Actions
- Set Wait_Script[Execution_Order] = Wait_Time
- Set Trigger_Script[Execution_Order] = Trigger
- Set Execution_Order = (Execution_Order + 1)
Variable Type
Wait Script - Real array (Remember to set the size).
Execution_Order - Integer.
Wait_Time - Real
Trigger - Trigger
Trigger_Script - Trigger array
Time_Expire - Timer
All this variable are the variable require for you to start off with. Create this trigger in order for the action to took place.
-
Next Trigger
-
Events
- Time - Time_Expire expires
- Conditions
-
Actions
- Trigger - Run Trigger_Script[Execution_Order] (checking conditions)
- Set Execution_Order = (Execution_Order + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Wait_Script[Execution_Order] Greater than or equal to 0.00
-
Then - Actions
- Countdown Timer - Start Time_Expire as a One-shot timer that will expire in Wait_Script[Execution_Order] seconds
- Set Time_Expire = (Last started timer)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Wait_Script[Execution_Order] Greater than 0.00
-
Then - Actions
- Trigger - Run Next Trigger <gen> (ignoring conditions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
- Set Execution_Order = (Execution_Order + 1)
-
Execution Order
- Events
- Conditions
-
Actions
- -------- Scene 1A --------
- Set Trigger = Scene 1A <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1B --------
- Set Trigger = Scene 1B <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1C --------
- Set Trigger = Scene 1C <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
From what you seens, Wait_Time at scene 1A was set at 2 seconds. Once 2 second have pass, it would execute Scene 1B and so on.
Remember, you need to create a trigger files for the action just like this.
-
Scene 1A
- Events
- Conditions
-
Actions
- Player Group - Pick every player in Player and do (Camera - Apply Camera[1] for (Picked player) over 0.00 seconds)
- Cinematic - Fade in over 2.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Custom script: call DestroyTrigger(GetTriggeringTrigger())
Why real are better than countdown timer
Less time consumption
It was easy to be organize compare to countdown timer.
When you are using countdown timer, you need to create this action at each of the trigger.
-
Scene 1
- Events
- Conditions
-
Actions
- Set Trigger = Scene 1 <gen>
- Countdown Timer - Start NextTrigger as a One-shot timer that will expire in 2.00 seconds
- Trigger - Add Scene 2 <gen> to the trigger queue (Ignoring conditions)
- Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
Execution Order
- Events
- Conditions
-
Actions
- -------- Scene 1A --------
- Set Trigger = Scene 1A <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1B --------
- Set Trigger = Scene 1B <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1C --------
- Set Trigger = Scene 1C <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
Reduce mistake and easier to check
When you are using countdown timer, there is a possibility of you making a mistake and it would take you time to look at each trigger to see where you did wrong.
-
Scene 3
- Events
- Conditions
-
Actions
- Set Trigger = Scene 2 <gen>
- Countdown Timer - Start NextTrigger as a One-shot timer that will expire in 2.00 seconds
- Trigger - Add Scene 4 <gen> to the trigger queue (Ignoring conditions)
- Custom script: call DestroyTrigger(GetTriggeringTrigger())
When you are using countdown timer, you would have hundred of trigger like this. It won't be easy to find the trigger that are mistakenly set if you are using countdown timer.
However, if you are using real. A mistake like this can be browse through a single trigger file and easier to be spot.
-
Execution Order
- Events
- Conditions
-
Actions
- -------- Scene 1A --------
- Set Trigger = Scene 1A <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1B --------
- Set Trigger = Scene 1A <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1C --------
- Set Trigger = Scene 1C <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
Can be repeated
Countdown timer doesn't allowed you to repeat the same action. If you want to repeat the same action, you have to create more than 1 trigger files of the same action. This isn't that good and time consuming if the repetition is frequent.
However, by using real; you can do it. Simply add Trigger - Run Active Trigger more than 1 just like this example below.
-
Execution Order
- Events
- Conditions
-
Actions
- -------- Scene 1A --------
- Set Trigger = Scene 1A <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1B --------
- Set Trigger = Scene 1B <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- -------- Scene 1C --------
- Set Trigger = Scene 1C <gen>
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Trigger - Run Trigger Active <gen> (ignoring conditions)
- Set Wait_Time = 2.00
Last edited: