Garry's Mod

Garry's Mod

Dathus' Core (E2 Functions)
136 Comments
[TR] James [YT] 17 Jan @ 2:30pm 
Wish the animate worked more like holoAnim as with holoAnim it plays the whole animation while animate doesn't seem to play the whole animation unless there's another addon that does holoAnim but for props
Dathus [BR]  [author] 7 Mar, 2024 @ 9:42am 
@Darmagon, No, It was never a function on this add-on. You must be mistaking for other add-on. On the link "E2 Code Demostration" there is all the original functions. And this function was not there.
Darmagon 7 Mar, 2024 @ 7:08am 
Think there used to be an "e:getSequenceList()" which was very useful for finding animations without guessing. Was it removed or is some bug making it not appear.
Dathus [BR]  [author] 7 Feb, 2024 @ 5:07am 
@Sanders, I tested the function and is working fine. my code was entity():isWeldedTo():setNoCollideAll() and attached the E2 to a prop. The prop got noCollideAll as it should. If is not working for you, you are doing something wrong.
Dathus [BR]  [author] 7 Feb, 2024 @ 5:00am 
@Sanders, some functions require parameters, This error is related to setNoCollideAll(), If you call this function without any parameters like setNoCollideAll() it will error out, or you call the function with a variable attached to a non-existing entity, it will generate this error.
You must call the function attached to a variable like: entityVariable:setNoCollideAll() where entityVariable can be any variable name. You got it now?
Sanders 6 Feb, 2024 @ 9:29pm 
care to explain on " make sure the function you are using have the required parameters" cause last i checked the code isnt doing this but on one side of the code. as when i set an entity to spawn i set it to no collide all so it shesnt freak out but ill look again.
Dathus [BR]  [author] 6 Feb, 2024 @ 5:21pm 
@Sanders, make sure the function you are using have the required parameters, This error should not happen, still, the function you are using requires one entity to apply, if you are calling setNoCollideAll() without an entity, You should run entity:setNoCollideAll() , entity is the variable example you should use any var for the required function.
Sanders 6 Feb, 2024 @ 12:56pm 
getting this error entities/gmod_wire_expression2/core/custom/dathuscore.lua:266: attempt to index local 'this' (a nil value)
AlexanderB2109 11 Sep, 2023 @ 1:34pm 
Ah, thanks for responding.
Dathus [BR]  [author] 11 Sep, 2023 @ 1:04pm 
@dbsw1972 (AlexanderB2109), It should not be incompatible, all expression 2 extensions should be compatible with each other if it does not use the same function names.
I tested, installed wire extras, enabled the extension, and is working fine as you can see here: https://steamhost.cn/steamcommunity_com/id/dathusbr/screenshot/2039622841082349609/ probably you disabled the holoanim extension or an update disable it. To me is working just fine. Make sure holoanim extension is enabled in the Q Menu
AlexanderB2109 11 Sep, 2023 @ 10:08am 
I can't seem to find my holoAnim() functions when I use this. Are they incompatible?
Cheaple 8 Jul, 2023 @ 9:09pm 
alr i fixed it i just added it to the if statement when adding someone to a table, thx for your assistance tho
Cheaple 8 Jul, 2023 @ 8:14pm 
The issue with that is the people in the table changes while the e2 is spawned so i can't do a if(first()) statement
Dathus [BR]  [author] 8 Jul, 2023 @ 1:05pm 
@Cheaple, there is no need to run egpHUDSetPlayer every 0.3 seconds. Once you fire the function once it will work while you have the game open. Or you don't delete the E2 or EGP.
You could put that code inside an IF (first):

interval(300)
if(first()) {
Plys = table()

foreach(_,V:entity=Plys) {
PlayersEGP:egpHUDSetPlayer(V)
}
}
Cheaple 8 Jul, 2023 @ 12:22pm 
Here's my current code that worked before:
interval(300)
Plys = table()

foreach(_,V:entity=Plys) {
PlayersEGP:egpHUDSetPlayer(V)
}

I understand that each 0.3 seconds it is readding that player to the EGPHUD, but idk how i could get around that
Cheaple 8 Jul, 2023 @ 12:16pm 
Well I have it inside an if function and it worked before you did the update on June 6th but i will try to work around it
Dathus [BR]  [author] 8 Jul, 2023 @ 3:53am 
@Cheaple, There is the convar: wire_egp_hud_print that should disable that message if you still want to run it multiple times, (A thing that you should NOT).
Dathus [BR]  [author] 8 Jul, 2023 @ 3:50am 
@Cheaple, It should not spam, If is spamming is because you are running it multiple times, and is not supposed to do it like that, That function is to run ONCE, there is no need to run it multiple times. And cannot do anything about the message, since is from Wiremod. Try to run it inside a if(first()){ }, That will avoid running the function multiple times.
Cheaple 7 Jul, 2023 @ 11:07pm 
well now it will just spam add the player to the egp hud and seeing the chat message flood chat is kind of annoying, could you fix that?
Cheaple 30 Jun, 2023 @ 7:25pm 
thx!
Dathus [BR]  [author] 30 Jun, 2023 @ 7:06pm 
@Cheaple, Fixed egpHUDSetPlayer
Dathus [BR]  [author] 30 Jun, 2023 @ 6:01pm 
@Cheaple, No, somebody did that fix, It was working fine. I tested numerous times. This is new, wiremod changed the way the EGP works, that's is what is broken, That I need to investigate and see.
Cheaple 30 Jun, 2023 @ 5:12pm 
Warning: Unhandled usermessage 'EGP_HUD_Use' (x38)

Just get this^ in console
Cheaple 30 Jun, 2023 @ 5:01pm 
Whatever you did to egpHUDSetPlayer broke the function and now it doesnt work, could you please fix it?
Dathus [BR]  [author] 7 Jun, 2023 @ 11:26am 
@peteg skinny, It was removed because a lot of people was complaining about it breaking add-ons of fall damage, that change fall damage, game modes, and etc, As you can read on this comments bellow, So to avoid conflicts, problems and etc, I decided to remove it completely. So yes if you want to disable fall damage, change it somehow, a separated add-on is required. :steamthumbsup:
peteg skinny 7 Jun, 2023 @ 10:37am 
Why was the fall damage function removed? can't the person just remove the falldamage code if they didnt want it?

then again it was breaking entire servers so I can't have a say.

I tried using a swep with an E2 chip and it just removes my ability to highjump and as well activated fall damage again.

moral of the story, just download a custom fall damage addon
Dathus [BR]  [author] 7 Jun, 2023 @ 6:05am 
Published version 1.3.0: Renamed add-on, removed tableToJson, jsonToTable, since jsonEncode and jsonDecode was added on wiremod, added console log message about version and date, fixed egpHUDSetPlayer function thanks to rush93, Removed fall damage functions since was conflicting with some other add-ons, added Number as argument on ignite function so you change the in seconds of the entity being ignited (Is generating some errors, need further investigation).
Roxieboy16 11 Jul, 2022 @ 8:47pm 
how do i use this??
DogeisCut 20 Nov, 2021 @ 9:57pm 
setNoCollide all and Ignite should have number inputs, NoCollide would change the nocollide state, and Ignite would change the ignition length
EnginesThey'reAmazing 17 Apr, 2021 @ 1:08pm 
how do I enable this core?
Niterux 10 Apr, 2021 @ 2:21am 
Yeah... this breaks addons that change fall damage...
꧁ Mr.lRoberth- ꧂ 17 Nov, 2020 @ 10:28pm 
Note for everyone DarkRP server owner...
This will revert realistic fall damage, doesn't matter if you set it as true on the DarkRP settings.
Best option, is to download the .gma and uncompress it, and go to line 42 in nexuscore.lua
Replace the whole function with this one:

function GetFallDamage( ply, flFallSpeed )
if ( FallDamageList[ply:UniqueID()] == "DISABLE") then
return 0
end
end

And upload the folder to your /addons/ folder, and that'll fix it.
Hopefully the developer finds a permanent fix for this, since it took me over 3 hours to go through every addon (workshop and directory) to solve this issue.
avangard 25 Jan, 2020 @ 10:57pm 
That castrated E2Power...
Dathus [BR]  [author] 19 Jan, 2019 @ 7:11am 
@jacob123456798, setPos is only for props. Teleport is for anything.
Jacbo 12 Nov, 2018 @ 11:59am 
What's the difference between your teleport() and the stock setPos()
The G-Man 6 Jul, 2018 @ 8:37am 
setOwner(Entity) Doesn't work. Im still the owner.
Cocoa Puffs 4 Jun, 2018 @ 10:36pm 
im trying to teleport entities... but it just doesnt work! (health vial entities)
RPGDW 17 Feb, 2018 @ 3:10am 
Workaround by toString(TestEnt:hasNoCollideAll()) == "true"
RPGDW 17 Feb, 2018 @ 2:59am 
From e2 docs "In Expression 2 conditionals, numbers are considered false if they equal 0. Otherwise, they are considered true. Functions and methods which conceptually return "true" or "false" return 1 and 0 respectively. "
Which sounds to me like it doesn't support true/false
RPGDW 17 Feb, 2018 @ 2:58am 
The code below prints false and I'm sure it shouldn't.
hasNoCollideAll returns true or false but it's like e2 doesn't understand true/false booleans and evaluates false to true?
Should Nexus return 1 or 0 instead of true or false?
Am I doing something wrong?

if(TestEnt:hasNoCollideAll()){
EntisSolid = 0
print(TestEnt:hasNoCollideAll())
}
BluPhoenixCZ 27 Jan, 2018 @ 4:41am 
and what set player velocity is it did add?
Sanders 29 Sep, 2017 @ 6:25pm 
ok
sorry i wasnt paying any miond when the code was done lol
Dathus [BR]  [author] 29 Sep, 2017 @ 5:50pm 
@SANDERS, Propbreak only break props..
Sanders 29 Sep, 2017 @ 4:40pm 
yea well the thing i wanna spawn is a sent i have one for prop spawn already lol
Dathus [BR]  [author] 29 Sep, 2017 @ 4:25pm 
@SANDERS, Try propSpawn instead of sentSpawn
Sanders 29 Sep, 2017 @ 3:54pm 
well i tried to use that and it didnt work lol i did this




if(BOOM && Arr[N,entity]:isPlayer()){
}
if(BOOM && Arr[N,entity]:isNPC())
{
Bomb = sentSpawn("gb5_misc_wildfire_barrel",0)
Bomb:setPos(Arr[N,entity]:pos())
entity():propBreak()
}
elseif(BOOM)
{
Arr[N,entity]:propBreak()
}
if(!Arr[N,entity]:isValid()){Arr[N,entity] = owner(),N = 1}



and it spawns them but doesnt explode them lol
Dathus [BR]  [author] 29 Sep, 2017 @ 3:52pm 
@SANDERS, Just use the Wiremod Extras, and use Entity:break(), i use it to my prop rockets.
Sanders 29 Sep, 2017 @ 3:07pm 
if you dont mind adding to your core: make a way to force an explosive entity to explode. even if it has an arm delay (and make it admin only) so it cant be abused on servers.
Sanders 29 Sep, 2017 @ 2:52pm 
Entity:teleport(Vector) i used this in an e2 i made lol its actually quite nice !
Zell 6 Jun, 2017 @ 1:11pm 
I think you need to update your core.
entities/gmod_wire_expression2/core/custom/nexuscore.lua:617: attempt to index local 'this' (a nil value)
Seems broken.