Part Visibility
Description
Checks the visibility of the parts of the target entity's model, as set by the PartVisibility mechanic
Attributes
| Attribute | Aliases | Description | Default |
|---|---|---|---|
| modelid | m, mid, model | The id of the model to check. If omitted, the parts of all active models are checked | |
| partid | p, pid, part | The part to check. If empty, all parts are checked | Empty String |
| visibility | v, visible | The visibility the parts should have | true |
| exactmatch | em, exact, match | Should the part id match the bone name completely. If false, every bone whose name contains the part id is checked | true |
| child | c, ch | Should the child bones of the checked parts also be checked | false |
The condition is met only if all of the checked parts have the given visibility. If no part matches, the condition is not met.
Examples
This sends a message once all of the arm bones of the model have been hidden.
sync=true makes the three lines run in order. Without it, the condition is checked before the model and partvis mechanics of the same trigger have taken effect, and the message is never sent.
Skills:
- model{mid=testing_model;sync=true} @self ~onSpawn
- partvis{mid=testing_model;pid=arm;em=false;v=false;sync=true} @self ~onSpawn
- msg{m="WHERE DID MY ARMS GOOOOO!?";delay=4;sync=true} @server ~onSpawn ?partvis{pid=arm;em=false;v=false}
This condition is met if the head bone of the target entity is visible
TargetConditions:
- partvis{pid=head} true
This condition is met if the left_arm bone and all of its child bones are hidden
Conditions:
- partvis{pid=left_arm;ch=true;v=false} true
Aliases
- partvis