Garry's Mod

Garry's Mod

Dathus' Core (E2 Functions)
137 条留言
[TR] James [YT] 10 月 9 日 下午 5:27 
Found it it was from Wiremod extras but now would also like the teleport function to have an angle property as well
[TR] James [YT] 1 月 17 日 下午 2:30 
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]  [作者] 2024 年 3 月 7 日 上午 9:42 
@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 2024 年 3 月 7 日 上午 7:08 
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]  [作者] 2024 年 2 月 7 日 上午 5:07 
@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]  [作者] 2024 年 2 月 7 日 上午 5:00 
@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 2024 年 2 月 6 日 下午 9:29 
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]  [作者] 2024 年 2 月 6 日 下午 5:21 
@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 2024 年 2 月 6 日 下午 12:56 
getting this error entities/gmod_wire_expression2/core/custom/dathuscore.lua:266: attempt to index local 'this' (a nil value)
AlexanderB2109 2023 年 9 月 11 日 下午 1:34 
Ah, thanks for responding.
Dathus [BR]  [作者] 2023 年 9 月 11 日 下午 1:04 
@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://psteamcommunity.yuanyoumao.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 2023 年 9 月 11 日 上午 10:08 
I can't seem to find my holoAnim() functions when I use this. Are they incompatible?
Cheaple 2023 年 7 月 8 日 下午 9:09 
alr i fixed it i just added it to the if statement when adding someone to a table, thx for your assistance tho
Cheaple 2023 年 7 月 8 日 下午 8:14 
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]  [作者] 2023 年 7 月 8 日 下午 1:05 
@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 2023 年 7 月 8 日 下午 12:22 
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 2023 年 7 月 8 日 下午 12:16 
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]  [作者] 2023 年 7 月 8 日 上午 3:53 
@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]  [作者] 2023 年 7 月 8 日 上午 3:50 
@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 2023 年 7 月 7 日 下午 11:07 
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 2023 年 6 月 30 日 下午 7:25 
thx!
Dathus [BR]  [作者] 2023 年 6 月 30 日 下午 7:06 
@Cheaple, Fixed egpHUDSetPlayer
Dathus [BR]  [作者] 2023 年 6 月 30 日 下午 6:01 
@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 2023 年 6 月 30 日 下午 5:12 
Warning: Unhandled usermessage 'EGP_HUD_Use' (x38)

Just get this^ in console
Cheaple 2023 年 6 月 30 日 下午 5:01 
Whatever you did to egpHUDSetPlayer broke the function and now it doesnt work, could you please fix it?
Dathus [BR]  [作者] 2023 年 6 月 7 日 上午 11:26 
@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 2023 年 6 月 7 日 上午 10:37 
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]  [作者] 2023 年 6 月 7 日 上午 6:05 
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 2022 年 7 月 11 日 下午 8:47 
how do i use this??
DogeisCut 2021 年 11 月 20 日 下午 9:57 
setNoCollide all and Ignite should have number inputs, NoCollide would change the nocollide state, and Ignite would change the ignition length
EnginesThey'reAmazing 2021 年 4 月 17 日 下午 1:08 
how do I enable this core?
Niterux 2021 年 4 月 10 日 上午 2:21 
Yeah... this breaks addons that change fall damage...
꧁ Mr.lRoberth- ꧂ 2020 年 11 月 17 日 下午 10:28 
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 2020 年 1 月 25 日 下午 10:57 
That castrated E2Power...
Dathus [BR]  [作者] 2019 年 1 月 19 日 上午 7:11 
@jacob123456798, setPos is only for props. Teleport is for anything.
Jacbo 2018 年 11 月 12 日 上午 11:59 
What's the difference between your teleport() and the stock setPos()
The G-Man 2018 年 7 月 6 日 上午 8:37 
setOwner(Entity) Doesn't work. Im still the owner.
Cocoa Puffs 2018 年 6 月 4 日 下午 10:36 
im trying to teleport entities... but it just doesnt work! (health vial entities)
RPGDW 2018 年 2 月 17 日 上午 3:10 
Workaround by toString(TestEnt:hasNoCollideAll()) == "true"
RPGDW 2018 年 2 月 17 日 上午 2:59 
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 2018 年 2 月 17 日 上午 2:58 
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 2018 年 1 月 27 日 上午 4:41 
and what set player velocity is it did add?
Sanders 2017 年 9 月 29 日 下午 6:25 
ok
sorry i wasnt paying any miond when the code was done lol
Dathus [BR]  [作者] 2017 年 9 月 29 日 下午 5:50 
@SANDERS, Propbreak only break props..
Sanders 2017 年 9 月 29 日 下午 4:40 
yea well the thing i wanna spawn is a sent i have one for prop spawn already lol
Dathus [BR]  [作者] 2017 年 9 月 29 日 下午 4:25 
@SANDERS, Try propSpawn instead of sentSpawn
Sanders 2017 年 9 月 29 日 下午 3:54 
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]  [作者] 2017 年 9 月 29 日 下午 3:52 
@SANDERS, Just use the Wiremod Extras, and use Entity:break(), i use it to my prop rockets.
Sanders 2017 年 9 月 29 日 下午 3:07 
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 2017 年 9 月 29 日 下午 2:52 
Entity:teleport(Vector) i used this in an e2 i made lol its actually quite nice !