Skip to content

Wiremod API

Deyan Dobromirov edited this page Nov 3, 2023 · 20 revisions

Documentation updates

Do NOT edit this documentation manually. This page is automatically generated!

What does this extension do?

The wiremod Lua extension Laser is designed to be used with Wire Expression2 in mind and implements general functions for retrieving various values form a dominant source entity or database entries. Beware of the E2 performance though. You can create feedback loops for controlling source beam parameters.

What is the wiremod Laser API then?

      Beam data parameters        Out   Description 
image:laserGetDataBounceMax(image) image Returns the maximum allowed laser beam bounces
image:laserGetDataBounceRest(image) image Returns the remaining laser beam bounces
image:laserGetDataDamage(image) image Returns the remaining laser beam damage
image:laserGetDataDirect(image) image Returns the last laser beam direction vector
image:laserGetDataForce(image) image Returns the remaining laser beam force
image:laserGetDataIsReflect(image) image Returns the laser source reflect flag
image:laserGetDataIsRefract(image) image Returns the laser source refract flag
image:laserGetDataLength(image) image Returns the laser source beam length
image:laserGetDataLengthRest(image) image Returns the remaining laser beam length
image:laserGetDataOrigin(image) image Returns the last laser beam origin vector
image:laserGetDataPointDamage(image,image) image Returns the laser beam node damage
image:laserGetDataPointForce(image,image) image Returns the laser beam node force
image:laserGetDataPointIsDraw(image,image) image Returns the laser beam node draw flag
image:laserGetDataPointNode(image,image) image Returns the laser beam node location vector
image:laserGetDataPointSize(image) image Returns the laser beam nodes count
image:laserGetDataPointWidth(image,image) image Returns the laser beam node width
image:laserGetDataRange(image) image Returns the laser beam traverse range
image:laserGetDataSource(image) image Returns the laser beam source entity
image:laserGetDataWidth(image) image Returns the remaining laser beam width
       Beam trace parameters         Out   Description 
image:laserGetTraceAllSolid(image) image Returns the last trace all solid flag
image:laserGetTraceContents(image) image Returns the last trace hit surface contents enums
image:laserGetTraceDispFlags(image) image Returns the last trace hit surface displacement flag enums
image:laserGetTraceEntity(image) image Returns the last trace entity
image:laserGetTraceFraction(image) image Returns the last trace used hit fraction [0-1]
image:laserGetTraceFractionLS(image) image Returns the last trace fraction left solid [0-1]
image:laserGetTraceHit(image) image Returns the last trace hit flag
image:laserGetTraceHitBox(image) image Returns the last trace hit box ID
image:laserGetTraceHitGroup(image) image Returns the last trace hit group enums
image:laserGetTraceHitNoDraw(image) image Returns the last trace hit no-draw brush
image:laserGetTraceHitNonWorld(image) image Returns the last trace hit non-world flag
image:laserGetTraceHitNormal(image) image Returns the last trace hit normal vector
image:laserGetTraceHitPos(image) image Returns the last trace hit position vector
image:laserGetTraceHitSky(image) image Returns the last trace hit sky flag
image:laserGetTraceHitTexture(image) image Returns the last trace hit texture
image:laserGetTraceHitWorld(image) image Returns the last trace hit world flag
image:laserGetTraceMatType(image) image Returns the last trace material type enums
image:laserGetTraceNormal(image) image Returns the last trace normal vector
image:laserGetTracePhysicsBone(image) image Returns the last trace hit physics bone ID
image:laserGetTraceStartPos(image) image Returns the last trace start position
image:laserGetTraceStartSolid(image) image Returns the last trace start solid flag
image:laserGetTraceSurfaceFlags(image) image Returns the last trace hit surface flags enums
image:laserGetTraceSurfacePropsID(image) image Returns the last trace hit surface property ID
image:laserGetTraceSurfacePropsName(image) image Returns the last trace hit surface property name
  Class configurations     Out   Description 
image:laserGetBeamDamage() image Returns the laser source beam damage
image:laserGetBeamForce() image Returns the laser source beam force
image:laserGetBeamLength() image Returns the laser source beam length
image:laserGetBeamMaterial() image Returns the laser source beam material
image:laserGetBeamPower() image Returns the laser source beam power
image:laserGetBeamSafety() image Returns the laser source beam safety
image:laserGetBeamWidth() image Returns the laser source beam width
image:laserGetDissolveType() image Returns the laser source dissolve type name
image:laserGetDissolveTypeID() image Returns the laser source dissolve type ID
image:laserGetEndingEffect() image Returns the laser source ending effect flag
image:laserGetForceCenter() image Returns the laser source force in center flag
image:laserGetKillSound() image Returns the laser source kill sound
image:laserGetNonOverMater() image Returns the laser source base entity material flag
image:laserGetPlayer() image Returns the laser unit player getting the kill credit
image:laserGetReflectRatio() image Returns the laser source reflection ratio flag
image:laserGetRefractRatio() image Returns the laser source refraction ratio flag
image:laserGetStartSound() image Returns the laser source start sound
image:laserGetStopSound() image Returns the laser source stop sound
image:laserIsBeam() image Returns true when entity can produce output beams
image:laserIsPrimary() image Returns true when entity has primary laser methods
image:laserIsSource() image Returns true when entity is an actual laser source
image:laserIsUnit() image Returns true when entity is registered as unit
              Other helper functions                Out   Description 
laserGetBeamIsPower(image,image) image Returns the flag indicating the power enabled threshold
laserGetBeamPower(image,image) image Returns the calculated power by external width and damage
laserGetDissolveID(image) image Converts dissolve type entry to the corresponding ID
laserGetReflectBeam(image,image) image Returns the reflected vector by external incident and normal
laserGetReflectDataID(image) image Returns the reflect loop ID database entry when available
laserGetReflectDataKey(image) image Returns the reflect loop key database entry when available
laserGetReflectDataRatio(image) image Returns the reflect ratio database entry
laserGetRefractAngleDeg(image,image) image Returns the refract interface border angle between two mediums in degrees
laserGetRefractAngleRad(image,image) image Returns the refract interface border angle between two mediums in radians
laserGetRefractBeam(image,image,image,image) image Returns the refracted vector by external incident, normal and medium indices
laserGetRefractDataContent(image) image Returns the refract loop surface content enum database entry when available
laserGetRefractDataID(image) image Returns the refract loop ID database entry when available
laserGetRefractDataIndex(image) image Returns the refract index database entry
laserGetRefractDataKey(image) image Returns the refract loop key database entry when available
laserGetRefractDataRatio(image) image Returns the refract ratio database entry
laserGetRefractIsNext() image Returns a flag indicating the beam exits the medium after being refracted
laserGetRefractIsSame() image Returns a flag indicating the same refraction indices arguments are present
Clone this wiki locally