WalkableAreas-characters question

Started by plebeo, Thu 08/03/2007 19:29:49

Previous topic - Next topic

plebeo



There's two characters in the same room: c1 and c2.

c1 can walk to specific area (and not beyond) and c2 to other area.
c1 area is included in c2 area.

How I can obtain this?

Khris

So one can switch the playable character? Or do they walk around at random?

If both of them are playable, just RestoreWalkableArea(x); respectively RemoveWalkableArea(x); when switching the player char.

Forgive me for asking again, but did you try to find a solution yourself?
Or do you just open another topic here every time the solution to a problem isn't bleeding obvious?

(If the characters are supposed to walk by themselves, restore/remove the area just before calling their Walk-command, this way the path finding will disregard the "forbidden" area.)

plebeo

I have tried to find a solution but I didn't find it!!
I'll try this solution!
Thanks for the patience ;)

Ashen

This has been brought up before, I think, and there's no easy way to do it. There's been a couple of suggestions in the past, but the closest I can find right now is this one that I made. Update to Region.GetAtRoomXY instead of GetRegionAt, and it should work for you if Khris's suggestion doesn't.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk