Garry's Mod

Garry's Mod

74 évaluations
[E2] Beam Core
   
Récompenser
Ajouter aux favoris
Favoris
Retirer des favoris
Type de contenu: Addon
Type d'addon: Outil
Mots-clés d'addon: Divertissement, Scénique
Taille du fichier
Publié le
Mis à jour le
17.047 KB
14 févr. 2015 à 15h24
19 avr. 2020 à 18h34
13 notes de changement ( voir )

S'abonner pour télécharger
[E2] Beam Core

Description
THIS IS AN EXTENSION FOR WIREMOD, NOT CONSOLE COMMANDS
Temporary Description:
Allows you to draw beams "lasers" with an e2
these can either be relative to the world or to an arbitrary position and rotation set by you.

Usage logic:
You define points for the beam to pass through, lines will go from point to point in sequencial order.
Leaving an empty index will result in an empty space between two lines.
An example of this would be:
-Define points 1,2,3,5,6,7
->4 Lines are drawn, 1-2, 2-3, 5-6, 6-7
You change the 'settings' of the beam (such as material and color) anytime.

Note that excessive use of these functions will result in a high NET IN. Be smart about it, parent the points.

If you want a beam (set of lines) to follow a particular entity, you define the points locally (small vectors usually, no entity():pos()! ).
Now to make the points move with the entity, you use the 'beamSetOrigin*' functions. (You set its position and use the parent function)

Function list:
beamPoint(id, vector position) --Define a new point
beamPoint(id, entity parent [, vector localpos]) --'Parents' a point to an entity.
beamMaterial(material) --Change the material of the beam
beamClear() --Clears the points (remove them)
beamSize(size) --Change the width of the beam
beamAlpha(alpha) --Change the alpha of the beam
beamColor(vector color) --Change the color of the beam
beamVisible(player, can_see) --Sets whether or not <player> can see the beam
beamGlobal(global) --Define whether points positions are local to an arbitrary origin or not (see below)
beamSetOriginPos(vector pos) --Change the position of the origin
beamSetOriginAng(angle ang) --Change the angles of the origin
beamSetOriginParent(entity parent) --Parent the origin to an entity
beamGetOriginEntity() --Get the entity representing the origin. Destroying this will remove the beam.

Note that all functions accept an extra 'beam index' at the start which can be used in a similar way to holograms indexes to manipulate multiple beams.

Commands:
BeamCore_CanUse [1-2] 2=Admin Only 1=Everyone (default:1)
BeamCore_MaxBeamsPerE2 [seconds] --Max beams per e2 (obvious)

Credits
JackCarterSmith -- Fixing this old addon for those that still use it :)
20 commentaires
Sanders 14 oct. 2022 à 23h04 
ok well seeing as you doint respond and your code with beamPoint(1,entity()) breaks causing the e2 to go nope and die i have to ask do you plan an upodate?
Sanders 28 sept. 2022 à 13h55 
ok so i wanna use this to target more then one prop is ther an example i could perhaps use?
Vurv 6 sept. 2022 à 0h26 
This is a notice that some functionality this extension will likely be broken by wiremod/wire#2399 if you don't convert your ``e2function``s to return proper ``Vector`` and ``Angle`` userdata rather than tables of three numbers.

This is a copy pasted message, I cba to download the addon and check myself if it does contain use of these. Feel free to delete if this is non-applicable.
Sanders 30 juin 2022 à 12h13 
ok well i guess the person that built this refuses to respond
Sanders 25 mai 2022 à 21h37 
ok there a way to "clip" the beams as im using them on rangers
[Sk$Bh]Trick or treat KID! 15 déc. 2020 à 6h57 
Useful !
NutellaBrain 1 juin 2018 à 12h37 
how do i use it
Zeluseffio 15 mars 2017 à 23h55 
Please can you make an example video or code, as i cant figure out whats what, i do know how to use holos but not these.
Meru 4 févr. 2017 à 8h01 
Fix! beamColor dosen't work and stays white.
Sanders 23 janv. 2017 à 12h07 
please fix this! the beam will not accept a diffrent color or material!