animate: Difference between revisions
Jump to navigation
Jump to search
m (add. see also) |
mNo edit summary |
||
Line 40: | Line 40: | ||
<dt class="note">'''[[User:bdfy|bdfy]]'''</dt><dd class="note">Animated object have to be in sight of the player (or camera) for the animation to be actually performed. If the object is not seen, animationPhase will only return zero.</dd> | <dt class="note">'''[[User:bdfy|bdfy]]'''</dt><dd class="note">Animated object have to be in sight of the player (or camera) for the animation to be actually performed. If the object is not seen, animationPhase will only return zero.</dd> | ||
<dd class="notedate">Posted on Aug 2007</dd> | <dd class="notedate">Posted on Aug 2007</dd> | ||
<dt class="note">'''[[User:Mikero|Mikero]]'''</dt><dd class="note">Animations can be used on existing game models such as houses that have doors eg. The general syntax is house animate ["dvere1",1] to open the door and house animate ["dvere1",0] to close it. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required.</dd> | <dt class="note">'''[[User:Mikero|Mikero]]'''</dt><dd class="note">Animations can be used on existing game models such as houses that have doors eg. The general syntax is house animate ["dvere1",1] to 'open' the door and house animate ["dvere1",0] to 'close it'. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required. | ||
<dd class="notedate">Posted on | |||
'open' and 'close' are visual perceptions of the state of the model. Open does not, necessarily mean, 1, and close does not mean 0. If a door is initially closed in the model, 1, will open it. If it is initialy closed visually, in the model, 1 will close it. | |||
initphase=1; (in config cpp) does not alter open and close meanings, all it does, is, set the model to the 'on' (rather than 'off') state to begin with. Whether on means open or close visually, is a p3d design decision. | |||
</dd> | |||
<dd class="notedate">Posted on June 2011</dd> | |||
<dt class="note">'''[[User:Tyger|Tyger]]'''</dt><dd class="note">Also, to animate the object called "Bar Gate" in ArmA, use the following: <pre>myGate animate ["Bargate",1]</pre> to close it, and <pre>myGate animate ["Bargate", 0]</pre> to open it.</dd> | <dt class="note">'''[[User:Tyger|Tyger]]'''</dt><dd class="note">Also, to animate the object called "Bar Gate" in ArmA, use the following: <pre>myGate animate ["Bargate",1]</pre> to close it, and <pre>myGate animate ["Bargate", 0]</pre> to open it.</dd> | ||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 18:08, 14 June 2011
Description
- Description:
- Process a linear animation on an object. Such animations are only used in user-made addons, they can be defined in the addon's config.cpp.
- Groups:
- Uncategorised
Syntax
- Syntax:
- objectName animate [animationName, phase]
- Parameters:
- objectName: Object
- [animationName, phase]: Array
- animationName: String - name of the animation. This is the class-name of the animation defined in the addon's config.cpp.
- phase: Number - range 0 (start point of the animation) to 1 (end point of the animation). The speed, in which the animation is processed, is defined in the addon's config.cpp and cannot be changed during running missions.
- Return Value:
- Nothing
Examples
- Example 1:
_building animate ["maindoor", 1]
Additional Information
- See also:
- animationPhaseanimationExists (VBS2)
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on January 20, 2007
- bdfy
- Animated object have to be in sight of the player (or camera) for the animation to be actually performed. If the object is not seen, animationPhase will only return zero.
- Posted on Aug 2007
- Mikero
- Animations can be used on existing game models such as houses that have doors eg. The general syntax is house animate ["dvere1",1] to 'open' the door and house animate ["dvere1",0] to 'close it'. Whether used on Oem addons, or official ones, an internal working knowledge (via config.cpp) of the model's animated name(s) is required. 'open' and 'close' are visual perceptions of the state of the model. Open does not, necessarily mean, 1, and close does not mean 0. If a door is initially closed in the model, 1, will open it. If it is initialy closed visually, in the model, 1 will close it. initphase=1; (in config cpp) does not alter open and close meanings, all it does, is, set the model to the 'on' (rather than 'off') state to begin with. Whether on means open or close visually, is a p3d design decision.
- Posted on June 2011
- Tyger
- Also, to animate the object called "Bar Gate" in ArmA, use the following:
myGate animate ["Bargate",1]
to close it, andmyGate animate ["Bargate", 0]
to open it.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Resistance version 1.75
- Operation Flashpoint: Resistance: New Scripting Commands
- Operation Flashpoint: Resistance: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands: Global Effect
- Scripting Commands OFP 1.96
- Scripting Commands ArmA
- Command Group: System Commands
- Scripting Commands ArmA2
- Scripting Commands VBS2