Pathfinding issue - solved!

Started by Dave Gilbert, Tue 12/01/2016 19:08:55

Previous topic - Next topic

Dave Gilbert

Hi all! It's been awhile since I used AGS for one of my own projects. A strange issue came up the other day and I can't seem to pinpoint the cause. If my character is in a position, and I click somewhere below him, the expected behavior would be for him to walk DOWN toward that position. However, my character is walking a tiny bit to the RIGHT, then moves his way to the desired position in a very awkward fashion. See the embedded video to see what I mean:

[embed=720,405]http://youtu.be/ai4RDvTuMvI[/embed]

Any ideas? Admitedly, it's been awhile since I've used AGS (a whole year and a half!) but I know I've never seen this issue before. Any help is appreciated!

Dave Gilbert

#1
And OY I figured it out two minutes after posting. The shadow under the player character is its own character and was still marked as "solid." So the player character was trying to walk AROUND the shadow. Ah well. I will dutifully mark it solved! If anyone in the future has the same issue and finds this post, you are welcome.

MiteWiseacreLives!

*inspired*
You continue to forge new territory, buddy  :-D
(this stuff happens to me all the time...)

Snarky

#3
Ah, interesting to have the shadow as a separate character. Is that intended as a workaround for this issue (if so, clever!), or is there some other reason for it?

If you're moving the shadow-character in code, I would recommend using an AGS build with late_repeatedly_execute_always(), so it will track the player position exactly every frame.

Crimson Wizard

Quote from: Snarky on Wed 13/01/2016 12:23:17
If you're moving the shadow-character in code, I would recommend using an AGS build with late_repeatedly_execute_always(), so it will track the player position exactly every frame.
Ummm, this build is based on not the latest version of AGS. I'd rather add this callback to the next release.

Snarky


Dave Gilbert

I've always used characters to make shadows. Not terribly clever, just never thought of doing anything else! I found it easier than messing around with rawdraw and things, which has its own problems.

SMF spam blocked by CleanTalk