NPC blinks before he is to be seen

Started by Fizz, Sun 06/06/2004 18:06:33

Previous topic - Next topic

Fizz

Hi!
In the intro for my game, theres a person sleeping in ROOM1, and then theres cut to another scene which is a closeup of the person whos waking him up which is moved to another room for graphic goodness purposes, and then back to ROOM1... The thing is, all these thing occur after some credits, and when the credits are over, theres cut to the scene mentioned before. my problem is, that the first split second youre watching, the character waking him up is showing, even though hes not supposed to be there before AFTER hes woken the player character up... is there a way to avoid this?

thanks
-patrick

Mr Flibble

I don't quite follow you, but be aware of this.
If you have any commands in a script AFTER a NewRoom or NewRoomEx command AGS will execute these things BEFORE it changes the room.

Example=
Wait(10);
FadeOut(1);
NewRoom(57);
FadeIn(1);
/Example

The game would carry them out in this order.
Wait
FadeOut
FadeIn
NewRoom.

Is that the problem?
Ah! There is no emoticon for what I'm feeling!

Fizz

no, theres no problems with the order of how the commands are executed... my problem is like this

in room A:

one character is sleeping on the floor

in room B (set in another room because the animation is an animated background)

closeup of a face saying: "HEY! YOU!"

back to room A:

the closeup guy wakes the sleeping guy up. action happens after this.


the problem is, that the wakeup guy is there the whole time, but i created a blank view and changed his view to that in the first part of the story in room A, and then i changed it back to his normal view for the second part. the problem is, that the program seems to be needing some time to change the view, so the character is visible in the first half second of the sequence... i bet theres a smarter way of getting around this, but hey.... what can i say, im more of a graphics kind of guy :)

thanks!

-patrick

strazer

So you want the wakeup guy to not be in Room 1 when it loads?
At the moment, he starts in Room 1 and you're moving him into another room manually after fadein, right?

You could either put the room change in "before fadein" instead or just change the character's starting room to -1.

Fizz

no, thats my problem... hes in room 1 all the time, but i only want him to appear the second time you get to the room...

strazer

I see.

The following is all easily possible by setting only Interaction Editor actions, but I'm sorry, I only know script:

Player enters screen (before fadein)

  if (GetGlobalInt(444)) { // global integer is anything but 0 (closeup has been displayed)
    character[WAKEUP].room = 1; // show character
    SetGlobalInt(444, 0); // reset gi so character is hidden next time intro runs
  }
  else { // global integer is 0 (closeup not yet shown)
    character[WAKEUP].room = -1; // hide character
  }

(Whatever triggers the room change)

  SetGlobalInt(444, 1); // set global integer to 1 (show wakeup character when returning to room 1)
  NewRoom(2); // cut to closeup

I've used global integer 444, but of course you can use whichever number <500 you want.

SMF spam blocked by CleanTalk