Moving an NPC to a room with X,Y values

Started by , Sun 24/08/2003 18:13:11

Previous topic - Next topic

42

I want to move an NPC to a room, so I use the "Move NPC To a Different Room" interaction, but, of course, it moves the NPC into the middle of the room instead the area I want it in. How do I set the x and y values? (Sorry if this was covered in a tutorial, manual, etc., but I looked and couldn't find it. I may have overlooked it.)

--42

Archangel (aka SoupDragon)

Oh dear oh dear oh dear. I suggest you look just a teensey bit harder :)


42

Nope, can't find it. And before you ask, yes, I am an idiot.

Archangel (aka SoupDragon)

#4
Ok, use this code:

character[CHARID].room = a;
character[CHARID].x = b;
character[CHARID].y = c;

To be fair, that is in a kindof poorly documented part of the help file. Look up "character[], variables" in the index.

If you're moving the player character, then of course you'd use NewRoomEx().

SMF spam blocked by CleanTalk