Raised This Month: $ Target: $400
 0% 

Wall ents


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-15-2005 , 00:11   Wall ents
Reply With Quote #1

How do I tell if what I'm looking at is a wall?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
sambro
Member
Join Date: May 2005
Old 05-15-2005 , 02:53  
Reply With Quote #2

Well I don't think map walls are entities. I have a little plugin that tells you what entity you're looking at (ID, classname, etc), and it tells me i'm not pointing at an entity when I point at a wall.

HOWEVER, walls created by that plugin (I forget the name) are entities and use the classname "func_wall" I think. So you could check what the user is pointing at, and if the entity classname is "func_wall", they're looking at a man-made wall.

Also, trace_line may be what you're looking for. You specify a start and end position, and qutoing the manual:
Quote:
Returns the point hit and an entity index if an entity was hit.
. I'm interpreting this as "returns a brush/entity hit, and an entity index if an entity was, in fact, hit".

All theoratical, I'd try myself but I'm too lazy
sambro is offline
Send a message via MSN to sambro
f1del1ty.oXi
Veteran Member
Join Date: Nov 2004
Old 05-15-2005 , 02:56  
Reply With Quote #3

I would have to say this. ---Be warned, spam---

You go up to it and ask it if it's a wall.

;)

---end spam--- (I had to do it. <3 v3x. )
__________________
f1del1ty.oXi is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 05-15-2005 , 03:32  
Reply With Quote #4

Quote:
Originally Posted by f1del1ty.oXi
I would have to say this. ---Be warned, spam---

You go up to it and ask it if it's a wall.

;)

---end spam--- (I had to do it. <3 v3x. )
lol
__________________
Plugins:
none

n0obie4life is offline
sambro
Member
Join Date: May 2005
Old 05-15-2005 , 05:20  
Reply With Quote #5

Why didn't I think of that?
sambro is offline
Send a message via MSN to sambro
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 05-15-2005 , 10:39  
Reply With Quote #6

Just a guess (since I have never tried doing what you want), but maybe this function will help ya?

From engine.inc
Code:
/* Will return the contents of a point (inside map? in sky? outside map? etc.). */ native point_contents(Float:fCheckAt[3]);

Then, with the return value compare it to one of the following contents:

From engine_const.inc
Code:
#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      /* removed at csg time */ #define CONTENTS_CLIP       -8      /* changed to contents_solid */ #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

I would assume that solid walls (Brush Based walls, not "func_wall" entities) would return CONTENTS_SOLID, but I could be wrong..

Anyway, I hope that helps..
xeroblood is offline
Send a message via MSN to xeroblood
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-15-2005 , 14:00  
Reply With Quote #7

Actually, now that I think about it.. I could probably just use that CONTENTS_SOLID thinger. I'll try and figure this out, lot's more questions to come now that I'm learning more about the Engine module.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-16-2005 , 21:11  
Reply With Quote #8

what about touching the wall?
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-20-2005 , 21:49  
Reply With Quote #9

Huh?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 16:38.


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