How would you go around delaying a value? I've got one object and I need another object to follow it after about a second or so. Just can't wrap my head around this one.
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
5th September, 2007 at 09:06:32 -
A way to do it:
Have a 1 dimensional array with 50 spaces (or more if he needs to wait more than 50 frames = 1 second).
Once you start walking, the other dude isn't close enough to you anymore and you start putting your current position in the 50th element, and push the previous value in that element one back.
Once there's a value in element 0 (or 1?) in the array, start positioining the other dude at that position.
You might want to store strings in the array so you can save both X and Y every frame, not just one value.