Raised This Month: $51 Target: $400
 12% 

Does anyone know how trigger_multiple works?


Post New Thread Reply   
 
Thread Tools Display Modes
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 12-02-2018 , 07:09   Re: Does anyone know how trigger_multiple works?
Reply With Quote #11

Quote:
Originally Posted by Neuro Toxin View Post
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
that can be written by anyone xD

I wanna know about how Source Engine checks whether someone is inside 3d Box. I think i said this many times in this thread xD

I just wanna compare it to my idea and wanna know which one would be better
__________________

Last edited by Starbish; 12-02-2018 at 07:11.
Starbish is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-02-2018 , 07:39   Re: Does anyone know how trigger_multiple works?
Reply With Quote #12

The exact code is irrelevant. You simply get the min/max bounds and check the client is in bounds on each axis.

Souce does allow rotation of the trigger volume/brush which would make it a little more tricky.

The engine already checks this for all triggers each frame, why would you want to stack your own method on top of it?
__________________
Neuro Toxin is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-02-2018 , 08:14   Re: Does anyone know how trigger_multiple works?
Reply With Quote #13

I don't think it checks collisions for all triggers each frame, even the HL1 engine didn't do that. A lot of algorithms go into optimizing the physics engine, it's not as simple as looping all entities and doing some basic math on each polygon/face to check bounds, I'm sure.
__________________
klippy is offline
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 12-02-2018 , 08:29   Re: Does anyone know how trigger_multiple works?
Reply With Quote #14

Quote:
Originally Posted by Neuro Toxin View Post
The exact code is irrelevant. You simply get the min/max bounds and check the client is in bounds on each axis.

Souce does allow rotation of the trigger volume/brush which would make it a little more tricky.

The engine already checks this for all triggers each frame, why would you want to stack your own method on top of it?
Just out of curiosity. Knowing the principle never makes you getting worse.

I don't understand why you post these..
__________________

Last edited by Starbish; 12-02-2018 at 08:29.
Starbish 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 11:37.


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