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

Does anyone know how trigger_multiple works?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 11-30-2018 , 02:55   Does anyone know how trigger_multiple works?
Reply With Quote #1

afaik trigger_multiple has been widely used to check whether player is inside 3d box.

does anyone know how it works? I think it could be replaced by doing dot product 3 times.
__________________
Starbish is offline
Mrs cheng
Member
Join Date: Mar 2017
Old 11-30-2018 , 12:31   Re: Does anyone know how trigger_multiple works?
Reply With Quote #2

https://github.com/Totenfluch/EventI...pawner.sp#L327

You can refer to this source code.
Mrs cheng is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 11-30-2018 , 22:18   Re: Does anyone know how trigger_multiple works?
Reply With Quote #3

Quote:
Originally Posted by Mrs cheng View Post
I just wanted to know how trigger_multiple works. Not about how to create with sourcemod.

I googled many times to find it, but no luck..
__________________
Starbish is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-30-2018 , 22:41   Re: Does anyone know how trigger_multiple works?
Reply With Quote #4

trigger_once and trigger_multiple are just entities that trigger based on the physics engine's touch system. I'm WAY too lazy to check how the touch system in the physics system works.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 12-01-2018 , 09:02   Re: Does anyone know how trigger_multiple works?
Reply With Quote #5

Quote:
Originally Posted by Starbish View Post
afaik trigger_multiple has been widely used to check whether player is inside 3d box.

does anyone know how it works? I think it could be replaced by doing dot product 3 times.
the trigger_multiple entity is that 3d box, whenever you touch that entity, an output will be triggered (like game_player_equip to give a weapon).
__________________
Ilusion9 is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 12-01-2018 , 14:55   Re: Does anyone know how trigger_multiple works?
Reply With Quote #6

Quote:
Originally Posted by Ilusion9 View Post
the trigger_multiple entity is that 3d box, whenever you touch that entity, an output will be triggered (like game_player_equip to give a weapon).
I'm curious about how it detects whether player is inside 3d box. sadly i couldn't find cpp files from SDK files. (highly likely due to lack of my cpp knowledge)
__________________
Starbish is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 12-01-2018 , 18:30   Re: Does anyone know how trigger_multiple works?
Reply With Quote #7

Quote:
Originally Posted by Starbish View Post
afaik trigger_multiple has been widely used to check whether player is inside 3d box.

does anyone know how it works? I think it could be replaced by doing dot product 3 times.
https://developer.valvesoftware.com/...a_Brush_Entity

Thats the best info I could find.

EDIT:

https://github.com/ValveSoftware/sou...pp#L2399-L2411
__________________

Last edited by zipcore; 12-01-2018 at 18:37.
zipcore is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-02-2018 , 03:23   Re: Does anyone know how trigger_multiple works?
Reply With Quote #8

https://developer.valvesoftware.com/...igger_multiple
__________________
Neuro Toxin is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 12-02-2018 , 05:05   Re: Does anyone know how trigger_multiple works?
Reply With Quote #9

Umm... I was talking about how its mechanism works(mathematical logic?). but Thank all of you guys for helping me!
__________________
Starbish is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-02-2018 , 06:02   Re: Does anyone know how trigger_multiple works?
Reply With Quote #10

Code:
OnServerFrame
  Loop trigger_multiples
    Loop clients
      If client pos within trigger bounds and not within trigger last frame
        Call OnEnter output
      If client pos outside trigger bounds and within trigger last frame
        Call OnLeave output
__________________
Neuro Toxin is offline
Reply



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 16:16.


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