Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - winterspray

#1
Beginners' Technical Questions / Moving NPC?
Wed 26/04/2023 01:30:05
Hey guys. I'm having trouble getting an NPC to move in the background of my room. I've tried some code from some other posts, but none of it worked. Can anyone help a guy out? Thanks.

EDIT:

Okay now this is more of an issue of some code not being cooperative. I saw that someone else had asked more or less the same exact question I'm having earlier, and someone replied with some code! Here it is:

if (cPopper.Moving)
{
  if (cPopper.x == 409 && cPopper.y == 153) cPopper.Walk (218, 157);
  else                                      cPopper.Walk (181, 349);
}

only problem is that the "if" at the beginning of the code is coming up as a parse error. Saying it's unexpected? What's a wallaby to do now? Thanks again.

By the way, I'm putting this in the room script. Is that fine, or do I need to put it somewhere else?
SMF spam blocked by CleanTalk