Garry's Mod Wiki

Garry's Mod Wiki

  boolean Entity:HasFlexManipulatior()

Description

Returns whether or not the the entity has had flex manipulations performed with Entity:SetFlexWeight or Entity:SetFlexScale.

Returns

1 boolean
True if the entity has flex manipulations, false otherwise.

Example

Defines server-side function which manipulates all of an entity's flexes and prints true if the entity has flex manipulations.

function FlexExample(ent) if(!IsValid(ent)) then return end -- Loop through all flexes for i = 0, ent:GetFlexNum()-1 do -- Set each flex to number ranging from 0.0 to 2.0 ent:SetFlexWeight(i, math.random()*2) end -- Print whether or not we have flex manipulations print(ent:HasFlexManipulatior()) end
Output:
true

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...