Instant Room Re-entry (SOLVED)

Started by Adorewood, Fri 17/03/2006 16:18:40

Previous topic - Next topic

Adorewood

I want my player character to exit a room (by walking off an edge) and then return after a few seconds. The game should be centered around the same room throughout the interaction. How can I do this?
I tried, well. doing the obvious:

// script for Room: Walk off right screen edge
    cFrank.ChangeRoom(100);
    cFrank.ChangeRoom(5);

(where room100 is a blank makeshift room, and room5 is the room to which the player character is supposed to return). But that returns the following error:

Error: NewRoom: Cannot run this command, since there is a NewRoom command already queued to run.

Now, I understand the error, but I can't think of much that I can do. Is there anyway to solve this problem? Can the character be made invisible for a certain amount of specified time?

strazer

Sure, just place him or let him walk to outside the visible room area. You have to use the eWalkAnywhere parameter of the Character.Walk function (check the manual) so he can walk on non-walkable areas.

Radiant

To do it the way you tried, you must change back to room 5 from the "enter room" function of room 100 (since you cannot invoke two changeroom requests in a row, they are only processed after the current script is finished).

However, Strazer's way is better. Additionally, you can make a character invisible by either setting them to a loop/frame that is blank, setting their X or Y coordinate to something ludicrous, or setting their transparency to 100%

Adorewood

Thanks guys. Once again you have solved my problem. And once again I feel stupid.
Thanks.

SMF spam blocked by CleanTalk