Skip to content

Wiremod API

Deyan Dobromirov edited this page Mar 23, 2022 · 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. The data type is standard for E2 and can be located here.

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:laserGetTraceHitPhysicsBone(image) image Returns the last trace hit physics bone ID
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: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: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
              Other helper functions                Out   Description 
laserGetBeamIsPower(image,image) image Returns the flag indicating the power enabled threshold
laserGetBeamPower(image,image) image Returns the calcuated power by external width and damage
laserGetReflectBeam(image,image) image Returns the reflected vector by external incident and normal
laserGetReflectDataKey(image) image Returns the reflect loop key database entry
laserGetReflectDataRatio(image) image Returns the reflect ratio database entry
laserGetRefractBeam(image,image,image,image) image Returns the refracted vector by external incident, normal and medium indices
laserGetRefractDataIndex(image) image Returns the refract index database entry
laserGetRefractDataKey(image) image Returns the refract loop key database entry
laserGetRefractDataRatio(image) image Returns the refract ratio database entry
laserGetRefractIsIdx() image Returns a flag indicating the same refraction indices arguments are present
laserGetRefractIsOut() image Returns a flag indicating the beam exits the medium after being refracted
Clone this wiki locally