How do I teleport a character to another room?

Started by , Sun 27/02/2005 19:00:52

Previous topic - Next topic

Aeila!

I don't even know how to make a NPC (non-playable character) move around. But how do I make it teleport it to another room?

And can someone please explain this whole GUI thing to me?

Goot

Actually it has nothing to do with the GUIs. GUIs are graphical user interfaces, like the iconbar at the top, where you can change the cursor mode. If you want to make/modify them look up GUI in the manual.

To teleport a non player character with scripting, use:
character[CHARID].room=x; //where CHARID is the character's
  //script name and x is the room you want them to go it.

you can also use the character[CHARID].x variable and
character[CHARID].y variable to instantly change the player's coordinates. (set the variables the same way you would the room one.)

If you want the player to start walking to a place on the screen, use:

MoveCharacter(CHARID,int x coordinate,int y coordinate);
or
MoveCharacterDirect(CHARID,int x coordinate,int y coordinate);
or
MoveCharacterBlocking(CHARID,int x, int y int direct);

look those up in the manual for more information about what each one does.

For all those scripting commands, there will be an equivalant with the other interaction-assigning interface, I'm just not sure exactly what they are.

Ashen

Actually, there's a simpler way: NewRoomNPC(CHAR, ROOM, X, Y);
In the interaction editor, you want Character - Move NPC to a different room and Character - Move character.

And, it would take too long to explain the 'whole GUI thing' - it's a very broad subject. Like Goot said, read through the manual first, then you can ask again if you have any specific questions.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk