An "entity's origin" story

Started by iLLo
20/07/2008 01:45
Page 1 of 1
iLLo20/07/2008 01:45

Hello .
I would like to know how i could set a pev as a user , to load the pev / entity to the in-eye position that i recorded before with the function

get_user_origin(id, origin, 1)

I don't realy know how to use the set_pev's values , so i'm a little lost :(

Thank you for your attention :)

SchlumPF20/07/2008 02:38

i dont know whether i understood you correctly but i guess you want to know how to store some costum data in a pev?
if yes there are some pev natives for hl mods which arent used:
pev_euser1 to pev_euser4 (dont know what they are for :S)
pev_fuser1 to pev_fuser4 (for storying floats but attention! fuser2 is already used by cs)
pev_iuser1 to pev_iuser4 (for storing integers)
pev_vuser1 to pev_vuser4 (for storing vector, vectors are 3-dimensional floats like new Float:vOrigin[3])

iLLo20/07/2008 13:57

hi .
You are absolutely right , i'm trying to store some data points (almost like checkpoints) . The problem was that MY checkpoints were situated at the cursor , the aim point . and i was trying to load my entity as a user , to allow it to have an aim cursor-like , so the entity could have been watching the same things as the user .. Thanks to you i may have my answer ! i'm going to check right now ! :D

Thank you :D

SchlumPF20/07/2008 15:06

btw better user fm_get_user_aiming() instead of get_user_origin(..., 1). get_user_Origin() does return an integer, fm_get_user_Aiming a float which is more exact. you can find the fm_get_user_aiming() function in fakemeta_util.inc

iLLo20/07/2008 16:56

Omg i've been searching for a function like this for months but didn't find it that's why i used get_user_origin :O thank you :') , thank you thank you :D

SchlumPF20/07/2008 18:34

just ask in this or alliedmodders forum if you need help ^^

iLLo26/07/2008 16:44

hmm excuse me but , fm_get_user_aiming() is not the same as get_user_aiming ?

It returns the value of the "thing" that the user is aiming at , isn't it ?

If yes , i don't realy need this one , because i need to record the "position" of the in eye view from the user .

You see , i'm trying to make a ghosttracer. It's a ghost that allow you to see your replay in "live" , it's much easier than give to the player, you want to share your run with ,a demo .

So i need something that returns the X, Y, and Z position of the cursor of the player , to put it in the pev's aim position . It's a parameter of the pev .

If you want to , i can give you my source code so you could tel me the best way i could do it :p

It would be realy helpfull :D

Thank you ! =D

SchlumPF26/07/2008 18:24

i think you mean pev_angle, fm_get_user_aiming() is the a better way than get_user_origin(...,3) :E

iLLo26/07/2008 19:37

maybe lol i'm french and i have troubles with english :p

That's why it's harder for me to know what pev_angle mean :p :p :p


I think the easiest way for me to explain you what i mean is to tell you what is my plugin .

My plugin allow you to have your own "ghost" , like in "mario kart" , to see yourself making the run you made before . It allows you to beat this run by lauching the ghost tracer , wich is an entity loaded as a terrorist .

The entity will be loaded at the points you recorded before , and this part is already done .

The only thing i need to do to finish the plugin , is to make him have a cursor ... hmm i don't realy know how to say it :'( . You know , in cs , when somebody is looking around , you can see where he is looking :)

And i want to get where the user is aiming , so my entity's aim could be loaded to thoses points . It will looks like the entity is a user , because is weapon/cursor/ is moving where you moved your own cursor before :p

I can't explain it better , i think :p

So . which function should i take ? :=p and HOW could i set it like i want to ? :p ( i'm new in plugmaking land :D)

thank you :p

SchlumPF26/07/2008 23:11

better contact me in steam ^^ addy: schlumpf_1337

iLLo27/07/2008 00:27

Ho and here are the troubles : my steam account got hacked :p So i test my plugins on a lan version of cs :p :p

I'd raver have a msn :p (sorry i know i have every trouble i could have =p )

Page 1 of 1

Please log in to post replies.