Raised This Month: $32 Target: $400
 8% 

[ H3LP ] Make Ent unsolid then solid


Post New Thread Reply   
 
Thread Tools Display Modes
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-17-2017 , 13:32   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #41

Quote:
Originally Posted by KiLLeR. View Post
It seems you didn't understand correctly my idea. Better listen to HamletEagle suggestion, because seems to be best solution.
He jsut told me not to sue TraceLine, becuz that ignores un-solid and SOLID_TRIGGER objects. The EntMod by DrunkenF00l was able to find SOLID_NOT too from a distance. Basically, ti could find every possible entity, even the water.
DarthMan is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 10-17-2017 , 17:50   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #42

@DarthMan try to use this method https://forums.alliedmods.net/showpo...5&postcount=18.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-18-2017 , 01:47   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #43

Quote:
Originally Posted by PRoSToTeM@ View Post
Yes, but it's not a very good idea to set it to SOLID_BBOX because, using this method, I would have to set all entities to SOLID_BBOX and this will just complicate things because the easiest method to do it would be on spawn or FM_KeyValue and then resetting the solid value will be a bit more complicated especially if more players are moving entities at the same time and there are better ways of doing it by keeping the values as they are, I'm pretty sure of that.

Last edited by DarthMan; 10-18-2017 at 01:51.
DarthMan is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 10-18-2017 , 02:04   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #44

It doesn't complicate anything, solid is immediately restored after trace.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-18-2017 , 02:25   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #45

Quote:
Originally Posted by PRoSToTeM@ View Post
It doesn't complicate anything, solid is immediately restored after trace.
Yes, but ti is for all entities, it'd better be only for the entity that u are aiming at no matter what kind of trigger entity it is, not jsut a weapon.

Last edited by DarthMan; 10-18-2017 at 02:26.
DarthMan is offline
Old 10-18-2017, 15:01
HamletEagle
This message has been deleted by HamletEagle.
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-18-2017 , 15:14   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #46

Quote:
Originally Posted by DarthMan View Post
He jsut told me not to sue TraceLine, becuz that ignores un-solid and SOLID_TRIGGER objects. The EntMod by DrunkenF00l was able to find SOLID_NOT too from a distance. Basically, ti could find every possible entity, even the water.
No, that's what you understood. I did not tell you not to use traceline, as there are workarounds for this, by adding more code instead of only using traceline.

You have to do something similar to your first code, but as you seem confused(mixing TR_ members) I suggested you to actually check what they mean. Anyway, what you have to do:
-make a traceline from player gun position
-check if you hit something with TR_pHit.
-if it's 0 then you have to get the end position with TR_vecEndPos and search around that origin with find_sphere_class, get the entity that's closer to your origin(if there are more entities) and that's what you should hit. This is a workaround, BECAUSE SOLID_TRIGGER ENTS AREN'T HIT BY TRACELINE.
__________________
HamletEagle is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 10-18-2017 , 16:43   Re: [ H3LP ] Make Ent unsolid then solid
Reply With Quote #47

Quote:
Originally Posted by HamletEagle View Post
No, that's what you understood. I did not tell you not to use traceline, as there are workarounds for this, by adding more code instead of only using traceline.

You have to do something similar to your first code, but as you seem confused(mixing TR_ members) I suggested you to actually check what they mean. Anyway, what you have to do:
-make a traceline from player gun position
-check if you hit something with TR_pHit.
-if it's 0 then you have to get the end position with TR_vecEndPos and search around that origin with find_sphere_class, get the entity that's closer to your origin(if there are more entities) and that's what you should hit. This is a workaround, BECAUSE SOLID_TRIGGER ENTS AREN'T HIT BY TRACELINE.
Yes but, will this work even if they are not on ground? Like fi the distance between the end position and entity position is bigger.
What I don't know is how I can get the entity that's closer to my origin. I mean, using vector_distance or get_distance_f are not a good diea in this case, because it has to go on the same line like if the traceline was actually an invisible entity touching the entity.

Last edited by DarthMan; 10-18-2017 at 17:11.
DarthMan is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:02.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode