Finding and manupulating objects XYZ?
Erm, how do I do that? I wanted to make like a build mode, so I kinda need that for precise building, and I hope you forgive me for not checking all the 501 pages for a semiliar post ^_^
|
Re: Finding and manupulating objects XYZ?
You might want to check funcwiki.
As far as I know you can move only entities, so you could check something about entities. So the gag is all about origins.Origin is representation of X,Y and Z as an array. Code:
new Float:origin[3] - Vector of positionI'd suggest using Fakemeta module. It's one of the most flexible tools of amxmodx. Origin's are stored in entity edict data, and with Fakemeta you get it using pev() function, and then set it with set_pev(). Code:
#include <amxmodx>If you need anything, just post I'll try to help. Right now I don't have time to finish this, but I'll do later Cheers ;) Nidza |
Re: Finding and manupulating objects XYZ?
To set an entity origin, use EngFunc_SetOrigin.
See from fakemeta_util.inc : Code:
Also, don't use this stock if you are already setting entity size. |
Re: Finding and manupulating objects XYZ?
Ok, I just gave the practical idea how to do it.
I'm not actually sure would it work, so Connor, is my idea right? Nidza |
Re: Finding and manupulating objects XYZ?
ConnorMcLeod, could really help if you explain XD
Thanks CodeMaster, You help ALOT, because the Oregin manupulating is basicly the main part of my addon, I wont forget to Credit you with it :D Btw, where to get the FakeMeta module? lol I got a bad feeling that it comes with the plugin [can't check it right now, because I use amxx only for Sven coop, and I just deleted it to update from 3.0 to 4.0b, and gotta reinstall amxx now ^_^] If im allready at it... I wanted to know how to add karma to someone, because I will +karma you (CodeMaster) as soon as I find out if it works XD |
Re: Finding and manupulating objects XYZ?
Quote:
|
Re: Finding and manupulating objects XYZ?
thx :D
____________ Quote:
[includes] new Float:origin[3] Declares that origin is a "Group" of 3 "members" that all are Floats? pev(entity_id, pev_origin,origin) Sets origin as enitity_id's pev_origin [that is, its origin]? [addition] set_pev(entity_id,pev_origin,origin) Updates the entity_id's pev_origin with the values of origin? as for example, and quick step by step explanation [of what I understand] will be: Code:
//includesEdit2: I found out something random... my naighbor snorts so loud I can hear him ._. |
Re: Finding and manupulating objects XYZ?
Ok, started anuther message because the one before really was abit too huge ._.
If im allready into all this stuff, [still on topic] is there any way to retourn the ID of an entity im looking at? |
Re: Finding and manupulating objects XYZ?
pev(entity_id, pev_origin,origin)
Gets enitity_id's pev_origin. And yes, there is way to get entity you're looking at. I assume you mean the one you're aiming at. PHP Code:
If you're looking for a coordinate, you can use a function from fakemeta_util.inc PHP Code:
|
Re: Finding and manupulating objects XYZ?
Quote:
also, I didn't understand how to use: Code:
like player's ID into player_id but will write in 0.0 if its null? same with aimed_entity will return ent_id but 0.0 if its not an entity? if thats correct, so I didn't know that gold-source had different ids for different body-parts or something, any way I can find info about it? oh, and it seems like I'm gonna ask you about how to code the whole plug-in step by step, so don't worry... I am trying to learn the most from any piece of information I get :D Otherwise, you are a REALLY helpful guy :D I guess there's no chance we can somehow talk over an IM software, right? [me no want to spam forums with questions =^.^=][But I will if its OK XD] |
| All times are GMT -4. The time now is 09:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.