Raised This Month: $ Target: $400
 0% 

Origins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 07-02-2009 , 11:30   Origins
Reply With Quote #1

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?



Excuse my failtastic picture!
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-02-2009 , 11:45   Re: Origins
Reply With Quote #2

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 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-02-2009 , 12:04   Re: Origins
Reply With Quote #3

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.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-02-2009 , 12:04   Re: Origins
Reply With Quote #4

3d picture would be better.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 07-02-2009 , 12:14   Re: Origins
Reply With Quote #5

I figured it out, works perfectly.
Thank you, arkshine.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Reply


Thread Tools
Display Modes

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 15:27.


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