Finding near origins
Well, I searched but didn't found exactly what I want.
For example, I have the origin of a player, so then... I want to get a random origin NEAR of the actual player origin, like an sphere. Thx, and sry if i writed something wrong in english. |
Re: Finding near origins
What do you want to create at that origin?
Or what do you want to use that origin for? |
Re: Finding near origins
If you don't want to spawn a solid entity or something similiar:
PHP Code:
|
Re: Finding near origins
@SnoW
That won't work, since you cannot change the value of a constant variable. Code:
|
Re: Finding near origins
This tutorial will give you much more detailed and useful information, such as checking if the origin is open and allowing you to scan continuously:
http://forums.alliedmods.net/showthread.php?t=49829 Here's some code that I wrote a while ago but which I didn't include in that tutorial: PHP Code:
|
Re: Finding near origins
Thx to all guys... helped me.
Also, thx for the link to that tutorial Hawk... but the code that you posted, emm I didn't understand at all, I don't know practically nothing about engine module. Oh and, a question... PointContents is the same as point_contents native? becouse is the only that I did found it in the funcwiki. |
Re: Finding near origins
Quote:
Quote:
|
Re: Finding near origins
Both PointContents() and EngFunc_PointContents are the same by calling the HL1 engine function.
|
Re: Finding near origins
Thx, well... here the lines that I don't understand:
PHP Code:
PHP Code:
PHP Code:
|
Re: Finding near origins
Quote:
The += 36.1 part raises the trace that hits the ground up by a nudge over 36.0, which is the height of a player. Quote:
PHP Code:
|
| All times are GMT -4. The time now is 17:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.