Skip to content

Wiremod API

Deyan Dobromirov edited this page Jan 14, 2022 · 20 revisions

Editing anc changes

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. Beware of the E2 performance though. You can create feebback loops for controling 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: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
laserGetReflectDataKey(image) image Returns the reflect loop key database entry
laserGetReflectDataRatio(image) image Returns the reflect ratio database entry
laserGetReflectVector(image,image) image Returns the reflected vector by external incident and normal
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
laserGetRefractIsOut() image Returns a flag indicating the beam exiting the medium after refracting
laserGetRefractVector(image,image,image,image) image Returns the refracted vector by external incident, normal and medium indices
Clone this wiki locally