Cannot turn GUIon ?!?

Started by spook1, Fri 04/06/2004 20:38:02

Previous topic - Next topic

spook1

After my introscreen, where I have turned off Gui(1), I want to turn it on again in room(2);

Now, the gui appears again, but only in room(3).
I have tried everything I can think off...
What am i missing??? I'm getting crazy.......

Is there a secret overruling setting or anything???
Or might this be my first bug? I can hardly believe AGS offers bug at my level :-P

regards,

a desperate Martijn

Pumaman

Can you be more specific? what script are you using to turn it back on? in what interaction?

spook1

I'll send the code of two different rooms:

First room(1): Here is what I am doing in the room where the gui does not appear:

Then room(2) I'll show the code from the opening scene: it seems that the first room after theopening does not show the GUI, when I make room 3 the second room, my problem occurs in room 3 instead of room 2.


// room script file (room1)


int line1=-1;
int line2=-1;
int line3=-1;
int line4=-1;
int line5=-1;
int line6=-1;
int line7=-1;


int currentID = 0;
int colour = 31;
int font = 0;
int centered = 0;
int xpos = 10;

function TypeLine(string line, int vspacing){
 
  int length=0;
  int i = 0;
  string displayedline;

  int textid = 0;

  length = 0; 
  i=0;
  StrCopy(displayedline," ");
  textid = CreateTextOverlay(xpos,50,400,font,colour,displayedline);

  length=StrLen(line); //set string length
  while(i<length){
   
    StrFormat(displayedline, "%s%c", displayedline, StrGetCharAt(line,i));
    SetTextOverlay(textid, 10,vspacing,400, font, colour, displayedline);

    if (StrGetCharAt(line,i) == ' '){
      Wait(5);
    }
    else{
      PlaySound(1);
      Wait(1);
    }
    i++;
  }
  return textid;
}

 

function room_a() {
  // script for room: First time player enters screen

line1 = TypeLine("Je naam: Volta.", 30);
Wait(60);
line2 = TypeLine("Je beroep: Space agent.", 50);
Wait(60);
line3 = TypeLine("Je cover: Engineer aan boord van een transportschip.", 70);
Wait(60);
line4 = TypeLine("Je missie: In het geheim vervoer je de", 90);
line5 = TypeLine("zwarte diamant van saturnus naar het", 110);
line6 = TypeLine("Amsterdam Museum of Space Minerals.", 130);
Wait(60);
line7 = TypeLine("Volta, stel de AIVD niet teleur.........", 190);


Wait(100);
RemoveOverlay(line1);
RemoveOverlay(line2);
RemoveOverlay(line3);
RemoveOverlay(line4);
RemoveOverlay(line5);
RemoveOverlay(line6);
RemoveOverlay(line7);

NewRoomEx(2,59,160);   



}

function room_b() {



function room_c() {
  // script for room: Player enters screen (before fadein)
GUIOff(0);
GUIOff(1); 
}



******************************************************************


// room script file (room2)

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

GUIOn(1);
}

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

function hotspot1_b() {
  // script for hotspot1: Any click on hotspot
DisplaySpeech(EGO,"De deur naar de gang");
DisplaySpeech(EGO,"Laten we maar gaan...");
Wait(10);
NewRoomEx(4,141, 190);   
}

function room_c() {
  // script for room: First time player enters screen

StopMusic ();
Wait(20);

DisplaySpeechAt(60, 59, 150,COMPUTER,"Je wordt over 5 minuten verwacht in de kantine voor ontbijt");
DisplaySpeechAt(60, 59, 150,COMPUTER,"Eet smakelijk");
Wait(30);
MoveCharacterDirect(EGO, 150,150);

}

spook1

Quote from: Pumaman on Fri 04/06/2004 20:57:07
Can you be more specific? what script are you using to turn it back on? in what interaction?

Pumaman, I just notice that the "problemroom" has a different size of background, can that be the problem??

spook1

OKAY, Indeed the problenm was too trivial,
I had a room of size  320 * 204 instead of 320 *240
When the diemnsions of the background do not fit, the GUI cannot be projected over the background and is left out...

Thanks for your interest and sorry for taking up your time :-(
Martijn

Pumaman

Can you try putting a Display() just before the GUIOn(1) just to check that the script is actually being called. Is it definitely hooked up to the interaction correctly?

SMF spam blocked by CleanTalk