Hi guys,
First time posting... I've been reading some posts the last few hours but I couldn't find exactly what I'm looking for...
I'm using the 9-verb MI style template.
I just started using the AGS software and I don't have any knowledge on programming but I've managed to make my character to look at certain Hotspots and say a few things... what I want to do is to make the main character to "use" a computer (hotspot), and that the computer screen is displayed on the game screen... I know I should use a new room for that, but I have no idea how to make the other room appear... also, since what needs to be displayed is a screen, I don't want the character to appear on screen in the new "room".
I tryed this:
function hCompu_AnyClick()
{
if (MovePlayer(454, 254))
player.FaceDirection(eDirectionUp);
{
if(UsedAction(eGA_Use)) {
player.ChangeRoom(2, 163, 120);
}
}
}
but it shows error when I "use the computer"...
I assume that it is similar to when you see maps in monkey island II but I have no clue...
sorry if it is an easy question but as I said, I'm just starting with this and all help is welcomed.
If this question was already answered, please post the thread...
if it's in any manual, please send a link and the page...
if you think I'm an idiot for asking this... that's OK... I think so too.
PS: if you could send me the code it would be nice af.
Thanks guys! 8-0
That piece of code is basically fine, what error did you get?
Edit: I completely missed the misplaced brackets; here's a fixed version:
function hCompu_AnyClick()
{
if (MovePlayer(454, 254)) {
player.FaceDirection(eDirectionUp);
if (UsedAction(eGA_Use)) {
player.ChangeRoom(2, 163, 120);
}
// else if (UsedAction(...)) { ... }
else Unhandled();
}
}
I'm not sure what the brackets in lines 5 and 9 are for ???
If you want to use a room without seeing the character you can either set the character's transparency to 100 or place the character outside the room's dimensions e.g cCharacter.y = -1;
Try moving the bracket in line 5 between lines 3 and 4..
I don't know that the problem was but I change the background and it worked (sorry) but I still don't know how to make the gui disappear.
(BTW thanks a lot you guys).
To reiterate: always post any error messages you're getting, verbatim.
To hide the GUI, use gMaingui.Visible = false;
Put the line in the room's Enters room before fade-in event.
Quote from: Khris on Wed 12/07/2017 01:52:53
To reiterate: always post any error messages you're getting, verbatim.
To hide the GUI, use gMaingui.Visible = false;
Put the line in the room's Enters room before fade-in event.
I've just done that and it worked :D
The only little thing is that the "Go to" line is still visible... It's not really a problem but it looks ugly... if you know how to fix it, it would be great... if not, still thanks xD
(http://i65.tinypic.com/2m5mryb.jpg)
ps: it is in spanish on purpose jajaja
img
Just add a line to also hide gAction.