npc's ignore walkable areas?

Started by miguel, Fri 26/12/2003 17:24:21

Previous topic - Next topic

miguel

hello to all,
I have a npc that I want  him to follow EGO, but it apears that he doesn't respect walkable areas,
is that a way to check/uncheck this?
thanks
Working on a RON game!!!!!

Scorpiorus

hmm, you mean he only walks on walkable areas? That was discussed in that thread: http://www.agsforums.com/yabb/index.php?board=2;action=display;threadid=10412;
CJ said it's not supported.

A way to simulate it however, as Chris pointed out, to use repeatedly execute:

at the top of the global script:
int follow_on;
int EAGERNESS = 40;
int eag;

repeatedly_execute:


if (follow_on == 1) {
if (eag<=0) {
MoveCharacter(MAN, character[EGO].x, character[EGO].y);
eag = EAGERNESS;
} else eag--;

}

so setting follow_on = 1 will make the character MAN follow character EGO assuming EAGERNESS parameter.

~Cheers

miguel

sorry for my english but I mean the oposite,
my npc walks OUTSIDE the walkable area,
I had to remove that possibility from that room because I checked everything and wasn't able to do it right, I even shorten the walkable are but with no results, the npc sprites are croped also (didn't know if that was the problem),
anyway thanks scorpioros,
miguel
Working on a RON game!!!!!

Scorpiorus

Have you tried the script? It should make the char that is following to move only on walkables. :P

miguel

got it, sorry for the trouble and thank you
Working on a RON game!!!!!

SMF spam blocked by CleanTalk