A silly question: how do I make a character appear in a certain room? I have tried editing the "start in room" setting and
character[ENGINE].room = 42;
What do I do wrong?
In ENGINE a non-player character (NPC)? If so, you have just moved him to that room. If you want to actually go there, you must call a separate player.room=... command or a NewRoom()/NewRoomEx() command. If it's the player character, it should move you along with it. Does room #42 exist? What actually happens when you test this out?
ENGINE is a NPC. I put this code in the "Players enters screen (before fadein)" section. But when I go to room 42, the character didn't appear. I can only see the background.
What's the character's coordinates? He can be out of the screen. Furthermore, is it possible that he's behind a walkbehind area?
And make sure that 42 is correct room number.
It is also possible that he is transparent (see SetCharTransparency), or has a view attached that is simply an empty image. Or has a baseline that is set wrongly.
Quote from: Radiant on Tue 12/10/2004 09:20:06Or has a baseline that is set wrongly.
I haven't set a baseline. This is likely the problem. I'll get back to you when I have tested it. And thank you for the fast, professional responses!
Yep, and also check the co-ordinates again of where you want the character to appear and that it's on a visible spot in that room. To do it via scripting, it might look like:
character[ENGINE].room = 42;
character[ENGINE].x=(150);
character[ENGINE].y=(100);
And I think by default, the character baseline is set at the bottom placement of the Y posistion? But you could change this as you like (as an example) with:
SetCharacterBaseline(ENGINE,100);