Two Characters

Started by FinalSin, Sat 26/06/2004 19:10:53

Previous topic - Next topic

FinalSin

This may be in the manual (apologies to the regulars) but is it possible, and if so how, to switch the player character? Changing inventory is not a problem.
The Blue Casket

Darth Mandarb

From the manual ...

----------------------------------

SetPlayerCharacter

SetPlayerCharacter (int char_id)

Changes the character which the player controls to CHAR_ID. You can either use the character's number, or the ID string set in the Room Editor. This function will also cause the room to change to the room which the chosen character is currently in. (It calls NewRoom with the character's room, so the change won't happen until the end of the script).
Note: The "player" global variable is not updated with the new character; so using "player.x", "player.name" and so on will change the original character, not the current player character.

Example:

SetPlayerCharacter(MAN);

will change the character that the player controls to character MAN and also change (if needed) the room to the room that the character MAN is .

----------------------------------

Should be what you're looking for.

SMF spam blocked by CleanTalk