Playing an animation after first room is loaded

Started by , Thu 01/09/2005 17:07:33

Previous topic - Next topic

jain

Okay, I have some game project, probably far too ambitious as I am a very bad scripter. My game already crashed once, but, hopefully, I had all my sprites and dialogues saved somewhere (anyway, they're the only thing I kind of manage).

Here is my (current) problem :
I just don't know where to start !

I mean, I have tried to make some other games and several things, all this is quite ok, since when the game starts, you are with your character, no animation has been played, and, depending on what you're gonna do or where you're gonna click, what I want to happen happens (at least for the easy things). But what I'm trying to do now is to make my character speak when the game is loaded. I first thought I had to put it in the "game-start" section of the script, as the player hasn't actually accomplished any action at that point. But as this sort of introduction sequence is supposed to happen IN the first room, the first room has to be loaded ; and as you guys surely know, the "game_start" section of the script is only useful for things that are to happen BEFORE first room is loaded.

So I tried what I first thought to be smart : I selected an area around the character's starting location in the first room, and then clicked the interaction button to make so that, when first room is loaded, my introduction (a simple monologue, and a few moves, if you want to know) is played. But when trying to run the game, I am told something like (I can't tell you the exact error message as seeing it again scares me, sorry :'() : "message has already been played ; perhaps dialogue script and main script don't agree with one another".

Well, there I get to the point : where do I have to script the action I want to happen BEFORE anything is done by the player but AFTER first room is loaded ??? ???

By the way, thanks to all your adventure-game-nostalgic people, these forum and engine are great.

Jain the Frenchie

RickJ

Open the first room in the AGS editor.  Open the interaction editor and create a "Player Enters Room  After Fadein" interaction" to run a script.  Open the script editor and place your script there inside the inteaction function you just created. For example:

function room_c() {
   // Player Enters Room After Fadin
   player.Say("This...");
   player.Say("That..");
   Wait(50);
   player.Move(...);
   player.Say("The other thing...");
}

jain

Thanx, I had found out, finally (and I feel VERY stupid for not having seen that "i" button), guess now, I'm a little noobless. But don't worry, I'll have lots of other stupid questions since I'm still working on that game...

SMF spam blocked by CleanTalk