Garry's Mod Wiki

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

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 4
Generate Html 6
SaveChanges (1) 11
Render Body 0
Render Sidebar 11