Actions after NewRoomEx

Started by Kinoko, Tue 27/01/2004 04:59:21

Previous topic - Next topic

Kinoko

I've got most of my intro sequence going now, but I have one minor problem. I'd like to change the room at one point, after having previously taken the player character and another character out of room 1 and into room 2. I can get everything displayed as I want, and all the characters at the right coordinates by using character[].room and NewRoomEx in the local script for room 1.

I then want to DisplaySpeech and use some animation in room 2, but I can't seem to make the script respond. The intro stops as soon as the new room is loaded.

I basically have a blank script for room 2. What lines of code do I use in the room 2 script to allow me to start scripting actions?

Ishmael

You should script the room 2 events (the speecha and animation) in the room 2 "Player enters screen (after fadein)", I think. This way, by splitting the script into their corresponding rooms, I write multi-room cutscenes. Another way is to use globalints and the global rep_ex, but that might get a bit confusing...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Kinoko

This is what I have in my room 2 script:

// room script file
function room_a() {
 // script for room: Walk off left screen edge
}

function room_b() {
 // script for room: Player enters screen (before fadein)
}

function room_c() {
// script for room: Player enters screen (after fadein)

DisplaySpeech (JULIO, "Thankyou ladies and gentlemen");

}



It seems pretty basic enough and yet as soon as the second room is loaded, the script stops and it returns control to the player. Like I said before, the character positions for this room are  written in the room 1 script with the newroom lines.

For the knowledge of scripting I have so far, it seems like it should be working but I can't understand why the script won't continue with the DisplaySpeech function I have on this room script. As soon as the room loads, I just get control of the cursor and nothing else happens.

Does anyone have any ideas on this?
Thanks so far, TK.

Ishmael

It that is what you have set, through Room Interactions -> [Interaction] -> Run Script, and typed in the scripts, it should work...

Try putting StartCutscene(x); in the Player enters screen (before fadein) interaction of the first room, and EndCutscene(); after the displayspeech line in the second line... Consult the manual in Game/Global -> StartCutscene(); for the x values, thus I cannot remember then right now...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Kinoko

(Thanks for the quick reply!)

OK, I think we hit something there - proof of my ignorance!

I did not know these things also had to be set in Room Interactions, I now see the light, I feel like an idiot, and everything works like a charm. THANKYOU.

SMF spam blocked by CleanTalk