Re: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread Benjamin Davison
-- [ Picked text/plain from multipart/alternative ] Thanks Robin :D This is a bit OT, but inbetween builds I just started getting this error. client Could not open the temporary file 'c:\bbssrc\cl_dll\Debug HL2MP\RSP01.rsp'. Make sure the file exists and that the directory is not write-protec

RE: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread Robin Walker
If you have a clientside entity that you'd like to position a hud element around, use these utility functions in cdll_util.cpp: bool GetTargetInScreenSpace( C_BaseEntity *pTargetEntity, int& iX, int& iY, Vector *vecOffset ); bool GetVectorInScreenSpace( Vector pos, int& iX, int& iY,

Re: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread Benjamin Davison
-- [ Picked text/plain from multipart/alternative ] NuclearFiend, great stuff thanks, yeah I am trying to put the sprite "at" the vector position on the screen, I should of been more clear about that. Omega, this is only going to be shown to a group of players, not all of them. Thanks for the top

Re: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread NuclearFriend
-- [ Picked text/plain from multipart/alternative ] I just thought I'd note this will only work if you are trying to get a "top down" position of the entity on the screen (assumed by how you assigned x to x and y to y directly). But if your trying to draw the sprite "at" the vector position on the

RE: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread Tony \"omega\" Sergi
You need to use ScreenTransform. (equivalent to the triapi->WorldToScreen in hl1) Also.. is this object you're pointing at, supposed to be pointed at by all players on the server, no matter what or something? -- -- omega Heroes of Excelsior http://www.heroesofexcelsior.com Blackened I

Re: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread NuclearFriend
-- [ Picked text/plain from multipart/alternative ] Look at the way origins are scaled to a 2D screen space in CMapOverview::DrawMapPlayers() and CMapOverview::WorldToMap On 4/11/06, Benjamin Davison <[EMAIL PROTECTED]> wrote: > > -- > [ Picked text/plain from multipart/alternative ] > Thanks guy,

Re: [hlcoders] Putting an entitys position on the hud with a graphic and other bonus questions.

2006-04-10 Thread Benjamin Davison
-- [ Picked text/plain from multipart/alternative ] Thanks guy, I have gone a different way and am just using a server side entity which works well. This is more a questions about maths theory than anything else, so I have the Vectors transmitting perfectly :D But making them usable on the HUD is