Character appearing [SOLVED]

Started by simulacra, Tue 12/10/2004 00:38:56

Previous topic - Next topic

simulacra

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?

TerranRich

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?
Status: Trying to come up with some ideas...

simulacra

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.

Gilbert

What's the character's coordinates? He can be out of the screen. Furthermore, is it possible that he's behind a walkbehind area?

Goot

And make sure that 42 is correct room number.

Radiant

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.

simulacra

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!

Barbarian

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);
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

SMF spam blocked by CleanTalk