Garry's Mod Wiki

Entity:SetLayerAutokill

  Entity:SetLayerAutokill( number layerID, boolean autoKill )

Recently Added

This was recently added in version (2025.07.31). It might only be available on the Dev Branch right now.

Description

Sets the autokill flag on the layer, making the layer be automatically removed once the animation playback finishes.

This function only works on BaseAnimatingOverlay entites!

Arguments

1 number layerID
The layer ID to change.
2 boolean autoKill
Whether to set or unset the autokill flag.