User Tools

Site Tools


es:orx:config:settings_structure:orxanim

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
es:orx:config:settings_structure:orxanim [2012/03/07 10:43 (13 years ago)] – [Summary] zeraes:orx:config:settings_structure:orxanim [2020/08/19 21:16 (5 years ago)] (current) – Old content sausage
Line 1: Line 1:
-===== Estructura orxANIMSET ===== 
- 
-==== Sumario ==== 
- 
-=== Animation Set === 
- 
-<code ini>[AnimationSetTemplate] 
-AnimationList = AnimationTemplate1#AnimationTemplate2#... 
-LinkList      = LinkTemplate1#LinkTemplate2#... 
-Frequency     = <float></code> 
- 
-=== Animation === 
- 
-<code ini>[AnimationTemplate] 
-DefaultKeyDuration = <float> 
-KeyData<N>         = GraphicTemplate 
-KeyDuration<N>     = <float> 
-KeyEventName<N>    = <string> 
-KeyEventValue<N>   = <float></code> 
- 
-=== Animation link === 
- 
-<code ini>[LinkTemplate] 
-Source      = SourceAnimationTemplate 
-Destination = DestinationAnimationTemplate 
-Priority    = <int> 
-Property    = immediate | cleartarget</code> 
- 
- 
-==== Details ==== 
- 
-=== Animation set === 
- 
-Here's a list of the available properties for an animation: 
-  * ''AnimationList'': List of all the animations (config names) that are part of this set. Up to 256 animations can be defined. This property //needs// to be defined. 
-  * ''LinkList'': List of all links ((a link is an available transition from an animation to another one)) that are part of this set. Up to 256 links can be defined. This property //needs// to be defined. 
-  * ''Frequency'': Relative frequency that will be applied to all animations of this set when they're played. Its default value is 1.0, which means the animation will be played with the timing defined in the config. 
- 
-=== Animation === 
- 
-Here's a list of the available properties for an animation set: 
-  * ''DefaultKeyDuration'': Default duration for all defined keys, in seconds. This duration can be overridden locally for any defined key. By default its value is 0.0 and needs to be defines unless every key has a local value. 
-  * ''KeyData<N>'': All the keys needs to be defined sequencially, starting with the ''KeyData1''. No gap is allowed in the numbers. For every key, the value is the [[orxGRAPHIC]] that will be rendered when the animation cursor points on this key, when played. At least one key (''KeyData1'') needs to be defined. 
-  * ''KeyDuration<N>'': For any key defined (with ''KeyData<N>''), a duration, in seconds, can be specified. If none is defined, the ''DefaultKeyDuration'' will be used instead. 
-  * ''KeyEventName<N>'': Custom events can be associated to keys in animations. They allow to synchronize with specific part of animations. 
-  * ''KeyEventValue<N>'': Optional value for an event. By default its value is 0.0. 
- 
-Example: 
- 
-<code ini>[MyAnimation] 
-DefaultKeyDuration = 0.1 
-KeyData1           = MyGraphic1 
-KeyData2           = MyGraphic2 
-KeyDuration2       = 0.2; <= this key will be displayed twice the time of the other keys 
-KeyData3           = MyGraphic1; <= Reusing the same content as for the first key 
-... 
-KeyEventName1      = SetSoundVolume 
-KeyEventValue1     = 1.0 
-KeyEventName2      = SetSoundVolume 
-KeyEventValue2     = 0.0 
-KeyEventName3      = Explode 
-... 
-</code> 
- 
-=== Animation link === 
- 
-Here's a list of the available properties for an animation link: 
-  * ''Source/Destination'': Defines the source and destination animations for the link, ie. the start and end of a possible transition. These properties //need// to be defined. 
-  * ''Priority'': Defines the priority of this link, rangin from 0 (lowest) to 15 (highest). Priorities are mostly used to define default transitions when no target animation is specified for the current object. By default its value is 8 which means a medium priority. 
-  * ''Property'': Defines the property of the link, it can either be ''immediate'', ''cleartarget''. If a link is ''immediate'' it means the transition will occur immediately instead of waiting for the end of the source animation before taking place. If a link is ''cleartarget'' it means that it will reset object's current target animation when the link is used. By default none of these properties are defined, which means the transition will occur //after// the source animation has been completely played and won't reset object's current target. 
- 
-Example: 
-<code ini>[LinkSitAnimLoop] 
-Source      = SitAnim 
-Destination = SitAnim 
-Priority    = 15; <= this is our transition of choice if no target anim is requested, we just cycle here for ever =) 
- 
-[LinkSitToStandUp] 
-Source      = SitAnim 
-Destination = StandUpAnim 
-Property    = immediate; <= that means we won't wait for the end of the SitAnim cycle before going to StandUpAnim 
- 
-[LinkStandUpToRun] 
-Source      = StandUpAnim 
-Destination = RunAnim</code> 
- 
-Now in the code, if we're currently playing the ''SitAnim'' and we issue 
- 
-<code c>orxObject_SetTargetAnim(MyHero, "RunAnim");</code> 
- 
-MyHero will first play immediately the ''StandUpAnim'' and then go to the ''RunAnim'' without you having to wait for any animation message or anything. You can listen to the ''orxEVENT_TYPE_ANIM'' events if you still want to be notified when transitions occur. 
- 
-Between two animations, the calculated path will take the highest priority links at each step and if two links with the same priority are found, it will then take the one that leads to the shortest path (ie. the least amount of links needed to reach destination). 
- 
-**NB: If you don't feel at ease with this [[wp>Graph_(mathematics)|graph system]], you can still define all your animations separately and then do all the transitions manually every time the current animation has been completely played (listening to the ''orxANIM_EVENT_STOP'' event, for example).** 
  
es/orx/config/settings_structure/orxanim.1331145833.txt.gz · Last modified: 2017/05/30 00:50 (8 years ago) (external edit)