Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Gribbler

#1441
Hi all!

I have a long horizontal room, scrolling sideways (640x200), with walkable area from one end to the other. However, there is a door approx. in the middle. What should I do to make player stop in front of the door if its locked, and continue walking when its open? I want the player to unlock the door,  open it, walk past it, and continue further into the scrolling room. I know that it would be much simpler with two separate rooms just connected with the door but it must be this way. How can I do this? Using regions somehow? Any ideas?
#1442
Thanks so much for help, Khris!
#1443
I'm still struggling with this...
Here's what I want to do in more details: Player wants to pick up TOOLBOX. When player interacts with it PLUMBER says "Leave that alone". Player must use BUCKET on HOLE_STREET (plumber character is in a hole) to be able to pick up TOOLBOX. PLUMBER is an invisible character placed around HOLE.

My code for TOOLBOX is:
Code: ags

function oToolbox_Interact()
{
if (Plumber_Unconscious) {
  player.AddInventory(iTOOLBOX);
}
else {
  cPLUMBER.Say("Leave that alone!");
}
}


Code for hotspot HOLE_STREET:

Code: ags

function hHOLE_STREET_UseInv()
{
if (player.ActiveInventory == iBUCKET) {
  
    if (Plumber_Unconscious) player.Say("Again? I don't think so.");
}
    else {
      Plumber_Unconscious = true;
      player.Say("Now it's safe to take it.");
    }
  }
  else player.Say("He won't let me take it.");
}



Plumber_Unconscious is a Global variable of type bool, initial value false.

I keep getting "unexpected else" at the end of hotspot HOLE STREET code.
#1444
Hi!

Here's what I intend to do: character1 (player) wants to interact with an object on screen. When he does other character2 tells him not to. Character1 uses inventory object on character2. Then he is able to interact with object.

How do I do this? Variables?

I figured out how to do something similiar when character1 clicks on object / inv item:

function iNOTEBOOK_Look()
{
if (Notebook_Variable == 0)  {
  player.Say("It must be that kid's notebook.");
  }
if (Notebook_Variable == 1)  {
  player.Say("There are nice pictures of dragons and knights in it.");
  }
if (Notebook_Variable == 2) {
  player.Say("He must have been crazy about fantasy.");
  player.Say("There are fantasy drawings on almost every page.");
  player.SpeechView = 7;
  Wait(10);
  player.Say("Hey! What's this?");
  Wait(15);
  player.SpeechView = 4;
  player.Say("It's some kind of collectible card.");
  player.AddInventory(iCARD);
  }

But how do I do those "conditionals" when using inventory items?

Thanks in advance for any suggestions
#1445
thanks dualnames, that worked.
#1446
Here's the deal. I have a hotspot and I want the player to say various things depending which item he uses on that hotspot.

Code:

function hDRAIN_PIPE_UseInv()
{
player.ActiveInventory = iNOTEBOOK;
player.Say("Why would I want to stick it in there?");

player.ActiveInventory = iHANDSAW;
player.Say("Why would I want to stick it in there?");

player.ActiveInventory = iSHIRT;
player.Say("Why would I want to stick it in there?");

player.ActiveInventory = iBUCKET;
player.Say("I can't.");
player.Say("The drain pipe is dry.");

}

Now the error I'm getting is this that the player doesn't have one of the items, and the game crashes. But he may have that item later on in the game and use it then. What can I do to make player say various things with using many different items? For example: a hotspot on which player can use every single item which will be available in the game.
#1447
whoa I didn't know such commands are available:-) just typed "play..." and when I saw MP3file I thought that's it. Thanks!
#1448
Hi

I want to play a short mp3 file during the game. Exemplary code:

function hHotspot1_Look()
{
player.FaceLocation(130, 100);
player.Say("Home sweet home.");
PlayMP3File("thebest_64kbs");
}

the background music (midi) stops but nothing happens. I tried to place that mp3 file (thebest_64kbs.mp3) both within music folder of the game and main folder. What am I doing wrong?

And one more thing. After the mp3 file stops playing will the background music turn back on? Because I want that mp3 file to be short, just a few seconds.

#1449
I even did't realized its that easy:-) Thanks a lot!
#1450
How to script within a dialog? For example: change character speech animation (view) during a dialog. Or how to get an item by chosing specific dialog topic? I know the commands for that actions (ChangeView, AddInventory) but just don't know how to incorporate them into dialog itself. Please do not write RTFM cause I already did...:-)
#1451
Hey, I changed inv gui visibility to normal and it worked. Thanks a lot, Khris.
#1452
Yes, inv gui didn't disappear and dialog is displayed on it. Dialog gui covers about 60% of inv gui. It looks like a big black rectangle (with dialog lines) is displayed on the inv gui. I didn't tried adding empty options, there must be a way of resolving this in other, well, subtle way.
#1453
thanks for quick reply but unfortunately that didn't help:-( And about the dialog gui covering inv gui, you're right, I didnt clear that up enough. By covering I meant that it covers it partially so you can see than one is displayed on another. What else can be done to overcome this problem? Maybe there is a possibility to resize the dialog gui so it covers up inv gui entirely?
#1454
Hi all

I'm using 320x150 locations with the inventory at the bottom (modified and resized default GUI with the option "always visible") but when a dialog starts it covers that inv gui. What can I do to hide the inv gui when the dialog starts?
My code doesn't work:

function cMarv_Talk()
{
gInventory.Visible = false; 
dMarv.Start();
gInventory.Visible = true;
}

any suggestions?

#1455
I have a following problem with walk-behinds. I have a location where first walk-behind is at the bottom of the screen (some rocks etc.) and I set the baseline at the lowest point of the walk-behind area, according to the turorial. But I also have other walk-behinds, hanging from above (which cover only the head of the hero) and those won't work, no matter where I put the baseline the hero is not covered. What am I doing wrong with baselines?
#1456
Nice work, very useful guide. Keep up the good work! I hope you'll be updating it constantly:)
#1457
Subspark that's fantastic news!! I can't wait! When you'll be posting this template in any form please do it with CAPS so I would not miss it;)
#1458
Is there any chance to include nice and perfectly working LucasArts GUI in upcoming release? :)
#1459
Nice job! Anyone cares to do a guide regarding simple LucasArts GUI? (with fewer commands)  :D
#1460
Hi!

Does anyone tried to built up a GUI using Ghost's tutorial?
Here's the link: http://www.freewebs.com/daemons-in-the-attic/codefront.htm
I've been struggling with it for some time now and can't get it up and running. Tutorial is very nicely written but still my scripting skills seem to be let's say inadequate:)
SMF spam blocked by CleanTalk