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

Solved Entity Touch without collision?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 07-14-2016 , 09:59   Entity Touch without collision?
Reply With Quote #1

I would like to create an entity. The players could walk through it with no collision.
I would also like to check when the player touches this entity.
Is it possible using FM_Touch?

Last edited by felhasznalo; 09-18-2017 at 07:58. Reason: mark as solved
felhasznalo is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 07-14-2016 , 15:01   Re: Entity Touch without collision?
Reply With Quote #2

Quote:
Originally Posted by felhasznalo View Post
I would like to create an entity. The players could walk through it with no collision.
> SOLID_BBOX and setting size for the entity.

Quote:
Originally Posted by felhasznalo View Post
I would also like to check when the player touches this entity.
Is it possible using FM_Touch?
> register_touch

Last edited by KiLLeR.; 07-14-2016 at 15:01.
KiLLeR. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-14-2016 , 16:12   Re: Entity Touch without collision?
Reply With Quote #3

Quote:
Originally Posted by KiLLeR. View Post
> SOLID_BBOX and setting size for the entity.
Did you mean SOLID_TRIGGER perhaps?

Last edited by klippy; 07-14-2016 at 16:12.
klippy is offline
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 07-14-2016 , 16:30   Re: Entity Touch without collision?
Reply With Quote #4

Quote:
Originally Posted by KliPPy View Post
Did you mean SOLID_TRIGGER perhaps?
Opps, I have read the question wrongly. Yep I mean SOLID_TRIGGER.
KiLLeR. is offline
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 07-15-2016 , 04:15   Re: Entity Touch without collision?
Reply With Quote #5

Setting pev_solid to SOLID_TRIGGER does not work for me. The touch callback is not called.
(It works with SOLID_BBOX, but I need an entity with no collision.)
Have you tried it? Could you show me one plugin that uses it successfully?
felhasznalo is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-15-2016 , 05:13   Re: Entity Touch without collision?
Reply With Quote #6

Share us your test code.

There are plugins like 'Walkguard' and other 'Zone' plugins that do what you are requesting,
take a look around and see if you can find your solution.
__________________
Retired.
Xalus is offline
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 07-15-2016 , 06:09   Re: Entity Touch without collision?
Reply With Quote #7

It looks like I mixed up the toucher and touched id in the callback function.
I found this out by looking at the 'Walkguard' source. Thanks!
felhasznalo is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-15-2016 , 08:16   Re: Entity Touch without collision?
Reply With Quote #8

You need to set more stuff than solid type:
1.EngFunc_SetSize which sets mins, maxs and size.
2.pev_solid with SOLID_TRIGGER
3.pev_movetype with a movetype that still allow collision(for example MOVETYPE_FLY or MOVETYPE_TOSS depending on what you want to do - the difference between this two is that first one is not affected by gravity)
__________________

Last edited by HamletEagle; 07-15-2016 at 08:23.
HamletEagle is offline
Leech_v2
Senior Member
Join Date: Mar 2011
Location: Chinese GuangDong
Old 07-16-2016 , 00:46   Re: [solved] Entity Touch without collision?
Reply With Quote #9

pev_groupinfo

Last edited by Leech_v2; 07-16-2016 at 00:46.
Leech_v2 is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-16-2016 , 08:56   Re: Entity Touch without collision?
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
You need to set more stuff than solid type:
1.EngFunc_SetSize which sets mins, maxs and size.
2.pev_solid with SOLID_TRIGGER
3.pev_movetype with a movetype that still allow collision(for example MOVETYPE_FLY or MOVETYPE_TOSS depending on what you want to do - the difference between this two is that first one is not affected by gravity)

The fact that it worked with SOLID_BBOX, means he did set size and all the needed requirements.
__________________
Retired.
Xalus 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 07:47.


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