This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
arma2:modeling:user_animation [2011-06-30 18:10] snakeman created user_animation initial page. |
arma2:modeling:user_animation [2016-10-03 12:39] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
Primary target - Vehicles | Primary target - Vehicles | ||
- | This tutorial is to show the basics of how to animate a section of a vehicle model with a USER action. Specific subject pictures are a aeroplane ramp, but any vehicle can have similar. | + | This tutorial is to show the basics of how to animate a section of a vehicle model with a USER action. Specific subject pictures are a aircraft ramp, but any vehicle can have similar. |
Line 134: | Line 134: | ||
RADIUS is the radius in meters around the ACTION_RAMP1 points that players will see the action in menu. | RADIUS is the radius in meters around the ACTION_RAMP1 points that players will see the action in menu. | ||
+ | |||
+ | |||
+ | ====== House Door ====== | ||
+ | |||
+ | **model.cfg**: | ||
+ | <code cpp> | ||
+ | class cfgSkeletons | ||
+ | |||
+ | class VTE_tigercage_Skeleton: Default | ||
+ | { | ||
+ | skeletonInherit = "Default"; | ||
+ | skeletonBones[] = | ||
+ | { | ||
+ | "VTE_tg1_door", "" | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | class CfgModels | ||
+ | |||
+ | class VTE_tigercage: Default | ||
+ | { | ||
+ | skeletonName = "VTE_tigercage_Skeleton"; | ||
+ | sections[] = {}; | ||
+ | |||
+ | class Animations | ||
+ | { | ||
+ | class vte_tigercage_door: Rotation | ||
+ | { | ||
+ | axis = "axis_door"; | ||
+ | selection = "VTE_tg1_door"; | ||
+ | }; | ||
+ | }; | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | **config.cpp**: | ||
+ | <code cpp> | ||
+ | class AnimationSources | ||
+ | { | ||
+ | class vte_tigercage_door | ||
+ | { | ||
+ | animPeriod = 1; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | class UserActions | ||
+ | { | ||
+ | class OpenTigerCage_door | ||
+ | { | ||
+ | displayName = "Open Door"; | ||
+ | position = "VTE_tg1_door"; | ||
+ | radius = 4; | ||
+ | OnlyForPlayer = true; | ||
+ | condition = "this animationPhase ""vte_tigercage_door"" < 0.5"; | ||
+ | statement = "this animate [""vte_tigercage_door"", 1];"; | ||
+ | }; | ||
+ | |||
+ | class CloseTigerCage_door: OpenTigerCage_door | ||
+ | { | ||
+ | displayName = "Close Door"; | ||
+ | condition = "this animationPhase ""vte_tigercage_door"" >= 0.5"; | ||
+ | statement = "this animate [""vte_tigercage_door"", 0];"; | ||
+ | }; | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | **Summary** | ||
+ | |||
+ | VTE_tg1_door is the selection in Resolution LOD. | ||
+ | |||
+ | axis_door is the memory point in Memory LOD. | ||
+ | |||
+ | **Note about Geometry LOD** | ||
+ | |||
+ | When you animate a door, in Geometry LOD it has to have ComponentXX and also the selection name like in our above example VTE_tg1_door, otherwise when you open the door it wont let you pass as geometry doesn't recognize anything happening. |