Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.31

Description

Description:

Checks whether instantly changing to the given IWV animation phase would result in the animation clipping into an obstacle.

For example, the function can tell you if animating a bulldozer shovel tip to animation phase 1 would result in it clipping into the ground. The test does not take into account collisions that might occur "on the way" to the new animation phase, nor does it take into account the time it might take to actually animate to the given phase.

Syntax

Syntax:[target, animation, phase] call fn_vbs_isCollisionIWA
Parameters:
  • target: Object - Object to test.
  • animation: String - Name of animation to test.
  • phase: Number - Target phase of animation to test (0-1).
Return Value:Boolean - Returns true, if there would be a collision, false if the animation would be executed without collision, or does not exist.

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
_colliding = [car1, "Door_1_1", 1] call fn_vbs_isCollisionIWA

Additional Information

See also: fn vbs animateIWA
Multiplayer: 
Problems: 

Notes