Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:44 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.