AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Does anyone know how trigger_multiple works? (https://forums.alliedmods.net/showthread.php?t=312378)

Starbish 11-30-2018 02:55

Does anyone know how trigger_multiple works?
 
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.

Mrs cheng 11-30-2018 12:31

Re: Does anyone know how trigger_multiple works?
 
https://github.com/Totenfluch/EventI...pawner.sp#L327

You can refer to this source code.

Starbish 11-30-2018 22:18

Re: Does anyone know how trigger_multiple works?
 
Quote:

Originally Posted by Mrs cheng (Post 2626196)

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

Powerlord 11-30-2018 22:41

Re: Does anyone know how trigger_multiple works?
 
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.

Ilusion9 12-01-2018 09:02

Re: Does anyone know how trigger_multiple works?
 
Quote:

Originally Posted by Starbish (Post 2626148)
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).

Starbish 12-01-2018 14:55

Re: Does anyone know how trigger_multiple works?
 
Quote:

Originally Posted by Ilusion9 (Post 2626249)
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)

zipcore 12-01-2018 18:30

Re: Does anyone know how trigger_multiple works?
 
Quote:

Originally Posted by Starbish (Post 2626148)
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

Neuro Toxin 12-02-2018 03:23

Re: Does anyone know how trigger_multiple works?
 
https://developer.valvesoftware.com/...igger_multiple

Starbish 12-02-2018 05:05

Re: Does anyone know how trigger_multiple works?
 
Umm... I was talking about how its mechanism works(mathematical logic?). but Thank all of you guys for helping me!

Neuro Toxin 12-02-2018 06:02

Re: Does anyone know how trigger_multiple works?
 
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



All times are GMT -4. The time now is 03:16.

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