====== Static Object Animations ====== **Static object animations** Here is guide to show you how to animate static objects which are placed on the WRP terrains or are available in mission editor as objects. Usually these objects are buildings which has doors that players can open and close. ====== model.cfg ====== **cfgSkeletons** class Default; class VTE_house: Default { skeletonInherit = "Default"; skeletonBones[] = { "VTE_cpdoor1", "" }; }; **cfgModels** class VTE_cmdpost: Default { skeletonName = "VTE_house"; class animations { class vte_cmdpostdoor1: Rotation { selection = "vte_cpdoor1"; axis = "vte_cpdoor1_axis"; angle1 = 1.8; }; }; }; ====== config.cpp ====== animated = true; class AnimationSources { class Opencmdpostdoor1 { animPeriod = 1; }; class Closecmdpostdoor1: Opencmdpostdoor1{}; }; class UserActions { class Opencmdpostdoor1 { displayName = "open door"; position = "vte_cpdoor1_pos"; radius = 2.5; OnlyForPlayer = true; condition = "this animationPhase ""vte_cmdpostdoor1"" < 0.5"; statement = "this animate [""vte_cmdpostdoor1"", 1];"; }; class Closecmdpostdoor1: Opencmdpostdoor1 { displayName = "close door"; condition = "this animationPhase ""vte_cmdpostdoor1"" >= 0.5"; statement = "this animate [""vte_cmdpostdoor1"", 0];"; }; };