Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Collision detection in a movement script. (https://forums.graalonline.com/forums/showthread.php?t=51987)

Gman4pwnu 03-28-2004 07:21 AM

Collision detection in a movement script.
 
Best way to handle it? I tried checking for onwall in a for loop, no good.

osrs 03-28-2004 03:28 PM

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 ;)

Loriel 03-28-2004 03:30 PM

You need to use a better for loop, and probably more.

osrs 03-28-2004 03:55 PM

By the way, wich kind of movement script are you working, move command or x/y settings?

Gman4pwnu 03-28-2004 07:00 PM

x,y.

I didn't know you could do it with move command.

TB3 03-28-2004 07:08 PM

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.
???

Gman4pwnu 03-28-2004 07:11 PM

im doing it for a player o.o

Python523 03-28-2004 07:22 PM

Quote:

Originally posted by osrs
Edit: Finally a proper thread name ;)
Uh? His title is fine.

osrs 03-28-2004 07:58 PM

Quote:

Originally posted by Python523


Uh? His title is fine.

I know and that's what i mean.

Python523 03-28-2004 08:50 PM

Quote:

Originally posted by osrs


I know and that's what i mean.

Misread it as 'find a proper' x_X sorry

Dach 03-28-2004 10:27 PM

Quote:

Originally posted by TB3

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.

arrays? don't know if that's really necessary, unless you're using something other than the normal vecx/vecy for directions...

I should probably write some tutorial for onwall detection, since i'm so fond of my little wall check algorithms

TB3 03-29-2004 08:33 AM

Quote:

Originally posted by Dach

arrays? don't know if that's really necessary, unless you're using something other than the normal vecx/vecy for directions...

I should probably write some tutorial for onwall detection, since i'm so fond of my little wall check algorithms

Its more convienent if you have a realy advanced onwall. Just checking 4 points for the players direction isnt enough.

Gman4pwnu 03-29-2004 09:26 AM

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 :))

WanDaMan 03-29-2004 09:45 AM

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.