Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {trigger:cp_roof_hatch_0_turnswitch}
- (L.L.roof_hatch_0_turnswitch_rot)
- ' Positions:
- ' 0: Closed
- ' 1: Air intake
- ' 2: Parallel to air flow
- ' 3: Air outtake
- l0 0.17 <
- {if}
- 0 (S.L.roof_hatch_0_turnswitch_rot_mode)
- {else}
- l0 0.5 <
- {if}
- 1 (S.L.roof_hatch_0_turnswitch_rot_mode)
- {endif}
- {endif}
- {end}
- {trigger:cp_roof_hatch_0_toggle}
- (C.L.cockpit_has_roof_hatch_switches)
- {if}
- (L.L.roof_hatch_0_state) 0 =
- {if}
- (L.L.roof_hatch_0_state) 1 + (S.L.roof_hatch_0_state)
- {else}
- (L.L.roof_hatch_0_state) 1 =
- {if}
- (L.L.roof_hatch_0_state) 1 + (S.L.roof_hatch_0_state)
- {endif}
- {endif}
- 1 (S.L.roof_hatch_0_bttn) s1
- (M.L.kippschaltersound)
- {endif}
- {end}
- '----------------------
- ' Init
- '----------------------
- {macro:cockpit_init}
- 0 (S.L.roof_hatch_0_state) (S.L.roof_hatch_1_state) (S.L.roof_hatch_2_state)
- 1000 random 500 / 1 - (C.L.roof_hatch_acc_var) * (C.L.roof_hatch_acc) + (S.L.roof_hatch_0_anm_0_Acc) (S.L.roof_hatch_0_anm_1_Acc) (S.L.roof_hatch_1_anm_0_Acc) (S.L.roof_hatch_1_anm_1_Acc)
- 1000 random 500 / 1 - (C.L.roof_hatch_maxspeed_var) * (C.L.roof_hatch_maxspeed) + (S.L.roof_hatch_0_anm_0_MaxSpeed) (S.L.roof_hatch_0_anm_1_MaxSpeed) (S.L.roof_hatch_1_anm_0_MaxSpeed) (S.L.roof_hatch_1_anm_1_MaxSpeed)
- {end}
- '----------------------
- ' Frame
- '----------------------
- {macro:cockpit_frame}
- (M.L.roof_hatch_0_toggle_frame)
- {macro:roof_hatch_0_toggle_frame}
- (C.L.cockpit_has_roof_hatch_switches)
- {if}
- (L.L.roof_hatch_0_state) 0 =
- {if}
- 0 (S.L.roof_hatch_0_anm_0) (S.L.roof_hatch_0_anm_1)
- {else}
- (L.L.roof_hatch_0_state) 1 =
- {if}
- 1 (S.L.roof_hatch_0_anm_0)
- 0 (S.L.roof_hatch_0_anm_1)
- {endif}
- {endif}
- {else}
- (L.L.roof_hatch_0_turnswitch_rot_mode) 0 =
- {if}
- 0 (S.L.roof_hatch_0_anm_0) (S.L.roof_hatch_0_anm_1)
- {endif}
- (L.L.roof_hatch_0_anm_0) ! (L.L.roof_hatch_0_anm_0_Speed) s0 abs 0.05 > (L.L.roof_hatch_0_rot_0) 0 > || &&
- {if}
- l0 /-/ (L.L.roof_hatch_0_anm_0_MaxSpeed) <
- {if}
- (L.L.roof_hatch_0_anm_0_Speed) (L.L.roof_hatch_0_anm_0_Acc) (L.S.Timegap) * - (S.L.roof_hatch_0_anm_0_Speed)
- {endif}
- (L.L.roof_hatch_0_rot_0) (L.L.roof_hatch_0_anm_0_Speed) (L.S.Timegap) * + (S.L.roof_hatch_0_rot_0)
- {else}
- (L.L.roof_hatch_0_anm_0_Speed) abs 0.05 > (L.L.roof_hatch_0_rot_0) 1 < || (L.L.roof_hatch_0_anm_0) &&
- {if}
- l0 (L.L.roof_hatch_0_anm_0_MaxSpeed) <
- {if}
- (L.L.roof_hatch_0_anm_0_Speed) (L.L.roof_hatch_0_anm_0_Acc) (L.S.Timegap) * + (S.L.roof_hatch_0_anm_0_Speed)
- {endif}
- (L.L.roof_hatch_0_rot_0) (L.L.roof_hatch_0_anm_0_Speed) (L.S.Timegap) * + (S.L.roof_hatch_0_rot_0)
- {else}
- 0 (S.L.roof_hatch_0_anm_0_Speed)
- {endif}
- {endif}
- (L.L.roof_hatch_0_rot_0) 1 >
- {if}
- 1 (S.L.roof_hatch_0_rot_0)
- {else}
- (L.L.roof_hatch_0_rot_0) 0 <
- {if}
- 0 (S.L.roof_hatch_0_rot_0)
- {endif}
- {endif}
- {end}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement