Garry's Mod

Garry's Mod

74 평점
[E2] AntCore
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Content Type: Addon
Addon Type: ServerContent
파일 크기
게시일
업데이트일
104.626 KB
2016년 12월 26일 오후 9시 58분
2020년 6월 22일 오전 1시 04분
업데이트 노트 74개 (보기)

다운로드 위해 구독하기
[E2] AntCore

설명
Useful E2 stuff

Documentation (too long for workshop): https://github.com/Antagonise/E2-AntCore


Some of the most useful functions:

E = shootBolt(pos, vel, damage)
Allows you to create a moving crossbow bolt that will hit targets identically as if you fired it yourself. Great alternative to hologram or prop projectiles.

E:turretShoot(direction, damage, spread, force, count, tracer)
Allows you to make an entity (including holograms) that you own fire a turret bullet that will act exactly like a real turret bullet.

propSpawnASync(enable)
Allows you to spawn more props per second, but they can't become solid until they would've been able to be spawned (via PropCore). Requires PropCore to be installed and enabled. By default, allows a max of 60 (non-solid) props to be spawned per second, any more than this can cause problems. Conforms to PropCore's settings for max solid per second. The benefit of this function is it makes your code much more manageable if it spawns a lot of different props in a short time.

findClosestCentered(pos, dir)
Finds the center entity based on a view angle, runs exactly the same as findClosest(pos) but for a direction.

findSetResults(R) / findAddResult(E)
Allows you to skip the actual finding part of find, but still use sort functions on known entities. Massively reduces lag.

runOnEntSpawn(enable) / runOnEntSpawn(type,enable)
Makes an e2 execute whenever an entity is created. Allows entity type to be specified, also the runOnEntRemove equivallent allows for specific entities only.

R:sort() / T:sort()
Returns a sorted array or table of keys from the input, sorted by the values. All values must be the same type.

E:setModelScale(N, time) / E:setPhysScale(N) / E:makeSpherical(..) / E:makeBoxical(..)
Allows extremely useful manipulation of physics and models. The first one allows linear smooth animated scaling of entities' models (including holos). The others allow entities themselves to physically be scaled.



Let me know if you find any problems.
댓글 72
Tenndex 2025년 10월 30일 오전 1시 20분 
Sorry Antonym died in an unfortunate surfboarding accident and left behind two kids and a racist bot
Sanders 2025년 10월 29일 오전 10시 44분 
yea soo im going to assume im not going to get a response?
Sanders 2025년 8월 20일 오전 8시 10분 
the bug: Bolts = shootBolt(holoEntity(14400598):toWorld(vec(0,0,0)),holoEntity(14400598):forward()) doing this with the turret near a wall causing the bolts to nail the wall behind it
Epic Face Christmas 2025년 7월 12일 오전 7시 46분 
what? Bug? with chair? serius?
Sanders 2025년 3월 29일 오후 12시 46분 
ok @Tenndex care to explain? cause i can show you how im doing it
Sawnik 2025년 2월 15일 오전 1시 45분 
anyone else having trouble with propSpawnASync(enable) not functioning?
Tenndex 2025년 1월 18일 오전 1시 51분 
Works for me just fine.
Sanders 2025년 1월 17일 오후 9시 14분 
ok sooo with this core its neat but the shootbolt has a MAJOR flaw. despite the holo it shoots from its not spawning from that holo! and i have to make sure the turret isnt near any walls or the bolt shoots backwards for some reason
Darmagon 2024년 10월 28일 오후 11시 54분 
On a server am having problems with n=propCanCreate() not detecting the e=propSpawn(svan) rate limit since this was added, believe the check may be getting overridden thinking propSpawnASync(n) is enabled.
Mardröm 2022년 3월 21일 오전 10시 56분 
my E2 is crashing whenever i use findClosestCentered(), the error says this:
entities/gmod_wire_expression2/core/custom/antcore.lua:746: attempt to perform arithmetic on field 'x' (a nil value)
as far as i can tell it's doing this only if it finds an entity, regardless of what i tell it to do with said entity or what i put in the pos/direction fields