Raised This Month: $ Target: $400
 0% 

PointContents


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 09-24-2004 , 16:13   PointContents
Reply With Quote #1

Is this usage correct?
Code:
new Float:origin[3],contents origin = {0.0,0.0,0.0} //just random contents = PointContents(origin)

So contents would equal these numbers?:

Contents Constants

#define CONTENTS_EMPTY -1
#define CONTENTS_SOLID -2
#define CONTENTS_WATER -3
#define CONTENTS_SLIME -4
#define CONTENTS_LAVA -5
#define CONTENTS_SKY -6
#define CONTENTS_ORIGIN -7
#define CONTENTS_CLIP -8
#define CONTENTS_CURRENT_0 -9
#define CONTENTS_CURRENT_90 -10
#define CONTENTS_CURRENT_180 -11
#define CONTENTS_CURRENT_270 -12
#define CONTENTS_CURRENT_UP -13
#define CONTENTS_CURRENT_DOWN -14
#define CONTENTS_TRANSLUCENT -15
#define CONTENTS_LADDER -16

Thanks in advance.
__________________
twistedeuphoria is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-24-2004 , 17:28  
Reply With Quote #2

Almost. Read the include files for correct syntax:

Code:
/* Will return the contents of a point (inside map? in sky? outside map? etc.). */ native point_contents(Float:fCheckAt[3]);
Johnny got his gun is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 09-24-2004 , 18:33  
Reply With Quote #3

Thanks, but could you explain what CONTENTS_CLIP, the CURRENT ones, and TRANSLUCENT are? Or point me to where to find them.
__________________
twistedeuphoria is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-24-2004 , 19:07  
Reply With Quote #4

try like this

Code:
   new Float:vec[3]    vec[0] = 0.0    vec[1] = 0.0    vec[2] = 0.0    new stuff = point_contents(vec);    if(stuff&CONTENTS_EMPTY)    {       //code here    }
Freecode is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-24-2004 , 20:23  
Reply With Quote #5

I have no idea... float around in spectator mode and do a pointcontent on where you are and see for yourself.
Johnny got his gun is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 09-25-2004 , 01:25  
Reply With Quote #6

Mmm...alright I'll get back to you.
__________________
twistedeuphoria is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 09-25-2004 , 09:06  
Reply With Quote #7

Ooh....I can make a good "is_user_inside" with this...
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 17:11.


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