Garry's Mod

Garry's Mod

79 oy
[E2] Beam Core
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
İçerik Türü: Eklenti
Eklenti Türü: Alet
Eklenti Etiketleri: Eğlence, Sahne
Dosya Boyutu
Gönderilme
Güncellenme
17.047 KB
14 Şub 2015 @ 15:24
19 Nis 2020 @ 18:34
13 Değişiklik Notu ( görüntüle )

İndirmek için abone ol
[E2] Beam Core

Açıklama
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 :)
21 Yorum
Sanders 31 Tem @ 16:56 
sv: Expression 2 (aimgun_CROSS): Runtime error 'entities/gmod_wire_expression2/core/custom/beamcore.lua:61: attempt to index local 'parent' (a nil value)' at line -1, char -1

e2 is saying this due to beam parent or something yet my code isnt using that lol can you please perhaps fix this?
Rodro5555555 3 Mar @ 20:31 
The BeamColor() function doesnt work
Thomas, plz fix
Sanders 28 Eyl 2022 @ 13:55 
ok so i wanna use this to target more then one prop is ther an example i could perhaps use?
Vurv 6 Eyl 2022 @ 0:26 
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 Haz 2022 @ 12:13 
ok well i guess the person that built this refuses to respond
Sanders 25 May 2022 @ 21:37 
ok there a way to "clip" the beams as im using them on rangers
[Sk$Bh]Trick or treat KID! 15 Ara 2020 @ 6:57 
Useful !
NutellaBrain 1 Haz 2018 @ 12:37 
how do i use it
Zeluseffio 15 Mar 2017 @ 23:55 
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 Şub 2017 @ 8:01 
Fix! beamColor dosen't work and stays white.