intro screen

Started by Leisuresuitpim, Fri 25/07/2003 11:43:43

Previous topic - Next topic

Leisuresuitpim

Hello again. Does anyone know what I am doing wrong. I want to have an intro screen, and I want the Gui to be disabled and the mouse to be the clock.
Can someone help me with this script.

I know that this script should hide the mouse and gui, but it doesn't work. It also doesnt automaticly go to room 2 after 20 gamecycles. Can someome help? I just don't seem to get (or perhaps find) the answer



// room text script file


function room() {
GUIOff (2);
HideMouseCursor();
}

function room_a() {
 // script for room: ENTERS SCREEN AFTER FADEIN
Wait(20);
NewRoom(2);
}
// room script file

Timosity

try this

// room text script file
 // script for room: Player enters screen (before fadein)
InterfaceOff(2);
HideMouseCursor();

// script for room: ENTERS SCREEN AFTER FADEIN
Wait(20);
NewRoom(2);
}


Note: Wait(20); will generally only last for half a second if that's what you want. generally Wait(40) is approx. 1 sec, so work from that as a guide.

Note2: make sure you turn the gui back on with

InterfaceOn(2);

at the point in the script where you need it back on.

hope this helps

~Tim

Leisuresuitpim

But can you give me the exact code? The ting I used didm't work at all. Don't I need functions or something. I cant seem to find what I'm doing wrong. Can you please give the whole room code. (and what about before player enters screen etc. I dont understand what it is supposed to mean)

Sorry for being such a newbie, but I just am.

Thanx anywayz

Timosity

In the AGS editor, open your room and click on the "i" (one of the buttons at the top the "interaction editor"

double click on "player enters screen (before fade in)"

then in the drop down box select "run script"

then click "edit script"

then type the code:

InterfaceOff(2);
HideMouseCursor();



Then click "file: exit and save changes"

then "ok"

then double click "player enters screen (after fade in)"

using the same method as previous, type

Wait(20);
NewRoom(2);


obviously you must have a "room2" to go to

And as I said before you might need to increase the wait period for a longer period of time.

And now I think about it, your original code probably worked but after half a second you ended up in room2, that's why you thought you started in room 2.

Try Wait(400); that will give it about 10 secs before it changes rooms, then you will know if it atleast worked.

Also try having rrom1 and 2 look very different so you can see what happens.

Hope you can work out what I've said

~Tim

TerranRich

...and that's GUIOff() not InterfaceOff(). It was renamed long ago. :)
Status: Trying to come up with some ideas...

Timosity

#5
Quote from: terranRICH on Fri 25/07/2003 18:33:38
...and that's GUIOff() not InterfaceOff(). It was renamed long ago. :)

On that note, is there a difference between the 2, I've still been using InterfaceOff(), using ver 2.55 and it still works. Is it going to become obsolete???

It's hard to keep track of all the changes

I have also used GUIOff() and It does exactly the same thing, what is the specific difference?

Scummbuddy

Nothing yet that I'm aware of, but Chris will not be supporting it anymore, and if he makes a specific reference or new code piece in reference to it, he'll use the Gui one instead of then Interface one.

The interface one came first, and then was changed by Chris to the Gui code.  Just try not to use the Interface one from now on.
:)
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Leisuresuitpim

thnx guys, i'll give it a try

SMF spam blocked by CleanTalk