Character pathing

Started by stranger, Fri 09/04/2004 01:10:22

Previous topic - Next topic

stranger

I have a character where I want it so you walk into the room and this character is walking back and forth, just have a set path to walk back and forth from until youwalk up and talk to this character. How can I do this?

If possible, explain how using the interaction menu, i dont know a lot about scripting.

Scorpiorus

#1
That's kinda advanced thing to achieve with the interaction editor only. Using of scripting makes it easier.

interaction: Room - Repeatedly execute
action -> Run Script

if (character[NPC].walking == 0) { //if NPC isn't walking
Ã, Ã, Ã, MoveCharacterPath(NPC,  50, 100);
Ã, Ã, Ã, MoveCharacterPath(NPC, 270, 100);
}

That will make NPC walk back and forth

Bryan

stanger, I'd just like to encourage you not to be afraid of scripting.  Once you get the basics you'll probably find that "Run Script" is the only useful option on the interaction drop-down.

Anyway, with Scorpiorus's example you've got the NPC walking back and forth, and you can use a variable in the room script for when you are talking to it.  Just set the variable when the dialog starts, and zero it when the conversation ends, and add that condition to the if()  in the repeatedly execute method.


this space intentionally left blank

SMF spam blocked by CleanTalk