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

Messages - winterspray

#1
yeah that's where I got the code from. I tried making it work with what I had, and it didn't seem like anyone would bother anyway. But thanks! I'll give it a try!
#2
It's a compiling issue. The output reads "Error (line 77): Parse error: unexpected 'if'".
Sorry for not being specific enough, I don't know why I didn't think to put that in my first post lol
#3
Quote from: Crimson Wizard on Wed 26/04/2023 01:39:05Please tell some details about your room, does it have walkable areas, is the NPC standing on the walkable area?
What is your goal exactly, making it walk from point A to point B, or keep walking along some path, or walk between two places repeatedly? anything else?

Please post the code you are using, it's difficult to tell something without it.

Sure.

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

Granted it isn't mine, I took it from an earlier post. I edited the post to futher describe the issue I'm now having. Also yes, the NPC is in a walkable area. I'm thinking that walking from point A to B would be easiest, but I'd like it if the NPC would walk to random locations in the area he's standing in.
#4
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