AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Origins (https://forums.alliedmods.net/showthread.php?t=96240)

Xellath 07-02-2009 11:30

Origins
 
A question for all of you, hope you can answer it.

I was trying to check if something were inside of 4 origins yesterday, I failed. Completely.
So now I'm asking you, how can I check if there's an ent or a player inside of the 4 origins?

http://i43.tinypic.com/24nqlg2.jpg

Excuse my failtastic picture!

Arkshine 07-02-2009 11:45

Re: Origins
 
The origins is placed randomly so it is not rectangular ? Or it always perfectly rectangular ? I mean you want to check if there is someone in a "box" or it's really 4 origins placed randomly ?

Arkshine 07-02-2009 12:04

Re: Origins
 
Because if it's inside a "box" I think the best way is to create an trigger_multiple entity on the center of this box, then setting the size of your box. Then you use register_touch() avec the entity classname and player, and you will know if someone is inside.

If random point, take a look at is_inside() here : http://forums.alliedmods.net/showthread.php?t=49343 it may help you.

ConnorMcLeod 07-02-2009 12:04

Re: Origins
 
3d picture would be better.

Xellath 07-02-2009 12:14

Re: Origins
 
I figured it out, works perfectly.
Thank you, arkshine.


All times are GMT -4. The time now is 15:27.

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