Move player character to a still moving NPC

Started by Revonx, Wed 05/11/2008 20:01:43

Previous topic - Next topic

Revonx

How to Move player character to a still moving NPC?

Probably a simple answer, couldn't find anything out about it though. I've been using a changing variable everytime an NPC walks onto a region and moving the player character accordingly. However, there must be a simpler way to do this out there. Also, is there a default distance or can you reset the actual pixel difference between the playable character and an NPC, when performing such tasks as looking, talking or using an inventory item on a still moving NPC.

Trent R

To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Khris

No he isn't.

It depends, is the NPC supposed to stop if the player character is e.g. going to talk to the NPC?
You could send the player to the NPC's coordinates (e.g. cNpc.x-20, cNpc.y).

Revonx

Quote from: KhrisMUC on Wed 05/11/2008 21:45:47
No he isn't.

It depends, is the NPC supposed to stop if the player character is e.g. going to talk to the NPC?
You could send the player to the NPC's coordinates (e.g. cNpc.x-20, cNpc.y).

The NPC stops anyway, any cursor click (other than walk to) on the NPC pauses any animation that it was doing. What I had in mind was a kind of 'walk to point' for characters such as there is for hotspots. This code that you have above, how would it be formulated into a 'character[EGO].Walk' command, or something similar. I didn't find anything in the guide, I hope I'm making some degree of sense. ;D.

Khris

Are you kidding?
character[EGO].Walk(cNpc.x-20, cNpc.y, eBlock);
or shorter
player.Walk(cNpc.x-20, cNpc.y, eBlock);

SMF spam blocked by CleanTalk