View Single Post
  #8  
Old 10-24-2006, 04:17 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Oh, by a glance at the code, I take it that this is the topdown shooter server you told me about? Sounds really fun, when will the server be playable to the public?

Btw,
I was working on a 360 degree car system with fine collision (sliding across walls too) detection. Ill post part of it for people to use. Its GS1 thought because I test it out in the editor (just an excuse to not learn GS2).

If anyone wants me to, I can post an edited one that allows straifing (and moving forward at same time).

NPC Code:

//If used, please give credit to me, wild8900 (or my persona, Irata)
//This is the basic collision and movement script.
//The collision is based around a centered point.
checky = y+sin((360-direction)*(3.14159/180))*speed;
checkx = x+cos((360-direction)*(3.14159/180))*speed;
if (!onwall(x, checky)) {
y = checky;
}
if (!onwall(checkx, y)) {
x = checkx;
}



Last edited by wild8900; 10-24-2006 at 05:28 AM..
Reply With Quote