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

Get entities in cube


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dakex
Junior Member
Join Date: Mar 2019
Old 11-11-2019 , 13:58   Get entities in cube
Reply With Quote #1

Hi. I want to create a simple cube. And I want to get every entity inside of that cube.
Should I use TR_TraceHull or is there some better way ?
(I want that cube to be there all the time.. I need to get the entities whole round).
Dakex is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 11-11-2019 , 16:47   Re: Get entities in cube
Reply With Quote #2

1. If you create that cube as an entity, you can use these:

PHP Code:

    HookSingleEntityOutput
(iEnt"OnStartTouch"EntOut_OnStartTouch);
    
HookSingleEntityOutput(iEnt"OnEndTouch"EntOut_OnEndTouch); 
from devzones plugin.

2. If there's no entity, use repeated timer, loop through all entities, get their origin and check if that origin is in the cube.
__________________
Ilusion9 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 19:36.


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