![]() |
Collision detection in a movement script.
Best way to handle it? I tried checking for onwall in a for loop, no good.
|
I think onwall(x,y) would be the best way, it did not work with you because you probably didn't apply it correctly.
Edit: Finally a proper thread name ;) |
You need to use a better for loop, and probably more.
|
By the way, wich kind of movement script are you working, move command or x/y settings?
|
x,y.
I didn't know you could do it with move command. |
Is your movement script for the player or for an npc?
For player you would use arrays with points to check around the player with a nifty for loop and alot more its realy complicated. Falados(Falcor) made one of the best that I had seen in a while. If your using it on a npc use move command, or just use a copy of one built for a player just make it more applicalbe for the npc in question. ??? |
im doing it for a player o.o
|
Quote:
|
Quote:
|
Quote:
|
Quote:
I should probably write some tutorial for onwall detection, since i'm so fond of my little wall check algorithms |
Quote:
|
what i do is i check every .1 coord for my script. Works nicely. Currently im dealing with the troubles of making character sit, sleep and swim. Along with push, (probably gonna use a for loop for that too :))
|
replaceani sit,newgani;
|
All times are GMT +2. The time now is 08:44 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.