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

Topics - metalmario991

#1
Beginners' Technical Questions / Script Issues
Fri 25/01/2019 03:37:09
I have two issues with the following script.
1) For some reason, the characters does some of the interactions, such as the look and open twice. I don't know why, but they keep doing that.
2) Some produce nothing at all, like Use.
2) The script for using the crowbar doesn't seem to work.

What's wrong here?

Code: ags
  if (MovePlayer(188, 79)) {
  player.FaceDirection(eDirectionUp);
  // LOOK AT
  if(UsedAction(eGA_LookAt)) {
  player.Say("These doors are our only obstacle in getting into the Stadium.");
  }
  // OPEN
  else if(UsedAction(eGA_Open)) {
      if (UsedCrowbar == false) {
       if (player == cMikePrologue) {
       player.ChangeView(33);
        player.Animate(3, 4, eOnce, eBlock, eForwards);
        player.ChangeView(32);
        player.Say("Hmmmm, this door appears to be locked.");
       }
       else {
        player.ChangeView(41);
        player.Animate(3, 4, eOnce, eBlock, eForwards);
        player.ChangeView(48);
        player.Say("Hmmmm, this door appears to be locked.");
       }
      }
      else {
      if (player == cMikePrologue) {
        player.ChangeView(33);
        player.Animate(3, 4, eOnce, eBlock, eForwards);
        aDoorOpe.Play(eAudioPriorityNormal);
        player.ChangeView(32);
        oDoors.Visible = false;
        oOpenDoors.Visible = true;
      }
      else {
        player.ChangeView(41);
        player.Animate(3, 4, eOnce, eBlock, eForwards);
        aDoorOpe.Play(eAudioPriorityNormal);
        player.ChangeView(48);
        oDoors.Visible = false;
        oOpenDoors.Visible = true;
      }
      }
  }
  }
     // CLOSE
  else if(UsedAction(eGA_Close)) {
    player.Say("It's already closed.");
  }
  // Push
  else if(UsedAction(eGA_Push)) {
  Unhandled();
  }
  
  // Pull
  else if(UsedAction(eGA_Pull)) {
  player.Say("It's a push door.");
  } 
  //USE INV
  else if(UsedAction(eGA_UseInv)) {
    if (player.ActiveInventory == iCrowbar) {
      if (UsedCrowbar == false) {
        if (player == cMikePrologue) {
          player.FaceDirection(eDirectionDown);
          player.Say("Normally, I don't advocate vandalisim.");
          player.FaceDirection(eDirectionUp);
          player.Say("But we can't find out what crashed in the stadium otherwise...");
          player.ChangeView(33);
          player.Animate(3, 4, eOnce, eBlock, eForwards);
          aBreak.Play(eAudioPriorityNormal);
          oDoors.Visible = false;
          oOpenDoors.Visible = true;
          player.ChangeView(32);
          player.Say("Whoops, I think I broke the lock.");  
        }
        else {
          player.FaceDirection(eDirectionDown);
          player.Say("I'm not sure forcing open the door with this old crowbar is a good idea...");
          player.FaceDirection(eDirectionUp);
          player.Say("HOWEVER, we need to get inside that Stadium!");
          player.ChangeView(33);
          player.Animate(3, 4, eOnce, eBlock, eForwards);
          aBreak.Play(eAudioPriorityNormal);
          oDoors.Visible = false;
          oOpenDoors.Visible = true;
          player.ChangeView(32);
          player.Say("Yikes, I broke the lock. I hope this isn't traced back to us...");  
        }
      }
      else {
      player.Say("I broke the lock, no need to use the crowbar anymore.");
      }
    }
    else {
    player.Say("I don't think that's gonna work.");
    }
  }
  else Unhandled();
}
#2
Beginners' Technical Questions / Layer Issue
Thu 24/01/2019 01:18:01
Hello. In my game, there is car that you open the trunk of.
You can walk behind this car and the player appears behind it.
I'm having a problem where the open trunk object keeps appearing in front of the player, and I can't seem figure out what about the baseline is causing this. Or if the walk-behind with the rest of the car is causing it.
#3
In my game, I use the 9-verb system. I have multiple characters, so I reduced the colums of inventory boxes from 3 to 4 to fit an icon to switch characters with.
While I changed the size of the inventory window to match the less space, the game only fills 2 of the 3 boxes in the row before going on to the next row.
How do I fix that?
#4
Hello, I am working on a game where you have multiple characters that you switch between.
My main questions are:
1) Best way to check what character you're using, for character-specific events/dialogue.
2) How to Give an item to another character and add it to their inventory.
3) Best way to switch between characters. I'm currently trying the DOTT way, with the character icons in the GUI.

As the last one implies, I'm using the Verb-style.
#5
In my game there is a map area, similar to the ones seen in Monkey Island. I want it so that when you hover over a location you can go to, text shows up above
the cursor telling you what the location is, just like Monkey Island. I was wondering how to do it because I can't find any other post or tutorial about it.
#6
I was editing around and changing some events. For example, on the map screen a cutscene would trigger that a mansion would explode and the game would make an object appear to make it seem like the mansion completely disappeared. Now, I don't know if it has anything to do with this glitch, but for some reason the character will not walk on a walkable area near the mansion so you get stuck at the mansion. I've tried walking through it from other parts of the map but they can't pass it either. What's wrong?
#7
I know how to stop a particular piece of audio but is there a universal command where I don't have to be specific? Also, is it possible to make audio eNoBlock so a voice clip will play when the music is going on? Finally, during my test, a weird screen glitch happened where it flashed back to the screen it was previously on. Here is my script:

function room_Load()
{
a106_goomba_village_theme.Stop();
a144_pG.Play(eAudioPriorityLow);
Wait(200);
a144_pG.Stop();
aMario16.Play(eAudioPriorityLow);
aMario15.Play(eAudioPriorityLow);
a3_52_G.Play(eAudioPriorityLow);
}

It happened when the voice clips started playing. It also doesn't seem to do the screen transition. I used the debug to get to the screen so is that what is wrong?
#8
I am creating a puzzle where you have to use an item on a tree in order to get something. I have it set up with the whole active inventory thing but what do I do to make it so you can do it only once. I know it has something to do with Game.DoOnlyOnce but I'm not sure what I should put in the (). If I put cTree2_UseInv() wouldn't it make it so I couldn't do anything else with the tree? I'm a little confused here.
#9
When you have dialog trees, how do you get rid of the black space so that the text is on the screen? Do I have to create my own text to get rid of it?
#10
In my game I want to do something like "Ben there, Dan that" and have a character that follows you around and you use to interact in certain puzzles. What I need to know are two things:
1) If I have the side character follow the main character how is that programmed?
2) When I use the side character icon to interact, do I use the User Modes 1 and 2 on objects? If so, how does that work?
#11
Beginners' Technical Questions / This Error...
Tue 28/07/2015 18:35:53
I am getting the following error but I don't know what is wrong: room2.asc(59): Error (line 59): buffer exceeded: you probably have a missing closing bracket on a previous line
What is wrong with it line 59? I don't see anything wrong with it. Here is my whole script;

Code: ags
// room script file

function hEND_WalkOn()
{
}

function oStatue_Interact()
{
cGuybrush.Walk(307, 173, eBlock, eWalkableAreas);
cGuybrush.FaceObject(oStatue, eBlock);
cGuybrush.Say("Even if I could get to it, it would be too heavy to pick up.");
}

function oStatue_Look()
{
cGuybrush.Walk(307, 173, eBlock, eWalkableAreas);
cGuybrush.FaceObject(oStatue, eBlock);
cGuybrush.Say("This SMG4 character must be really narcissistic to put a statue of himself in his own pool.");
}

function oStatue_Talk()
{
cGuybrush.Walk(307, 173, eBlock, eWalkableAreas);
cGuybrush.FaceObject(oStatue, eBlock);
cGuybrush.Say("Hi!");
cGuybrush.Say("Do you know where I can find SMG4?");
}

function hDoor_Look()
{
cGuybrush.Walk(337, 120, eBlock, eWalkableAreas);
cGuybrush.FaceLocation(146, 103, eBlock);
cGuybrush.Say("This door leads into SMG4's Mansion.");
}

function hDoor_Interact()
{
cGuybrush.Walk(337, 120, eBlock, eWalkableAreas);
cGuybrush.FaceLocation(146, 103, eBlock);
cGuybrush.Say("Hmm...this door appears to be locked.);
}

function hDoor_Talk()
{
cGuybrush.Walk(337, 120, eBlock, eWalkableAreas);
cGuybrush.FaceLocation(146, 103, eBlock);
cGuybrush.Say("That doesn't seem to talk.");
}

function hDoor_UseInv()
{
cGuybrush.Walk(337, 120, eBlock, eWalkableAreas);
cGuybrush.FaceLocation(146, 103, eBlock);
cGuybrush.Say("That doesn't seem to work.");
}
function oStatue_UseInv()
{
Guybrush.Walk(307, 173, eBlock, eWalkableAreas);
cGuybrush.FaceObject(oStatue, eBlock);
cGuybrush.Say("That doesn't seem to work.");
}
#12
I am working on the cursors for my game when I was wondering, how do I program it so the cursor changes on stuff you can interact with?
#13
How do I get a screen to scroll to another instead of completely changing the room?
#14
I am trying to implement a Use/Interact Icon in the inventory box, but I am running into some problems. When you click on it changes to the walk icon and it doesn't interact with anything. Here's how I wrote it;

function bInteract_OnClick(GUIControl *control, MouseButton button)
{
mouse.Mode = eModeInteract;
mouse.UseModeGraphic(eModeInteract);
}
#15
I wanted to know if there is a way to lock the cursor on one specific type. For example, when the player dies and gets the Death Screen how do I make it so they can only use the Pointer cursor?
#16
Because I can't find the answer anywhere else how do I tie a timer to the whole game so the event that occurs when it expires happens anywhere instead of just one room? If I need to be more specific, I am just asking where I put the execution after it expires.
#17
This is the following script for an action in my game.

function hRed_Interact()
{
if (Power == 0)
{
Display("Nothing works without power.");
}
else if (Power == 1)
{
cEgo.Say("Maybe I shouldn't have pressed that...");
Display("You think?!?");
Wait(1);
cEgo.ChangeRoom(27, 900, 900);
Display("I hope I am in your will.");
cPod.ChangeView(15);
cPod.Animate(0, 5, eOnce, eBlock, eForwards);
Display("After blowing a big orfice in the side of the ship the pressure from space does a find job turning your already warped body into a hellish abomination. It is too sad and hideous to see.");
Display("(It's more hideous than your Mother-in-Law!)");
cEgo.ChangeRoom(11);
}
else if (Power == 2)
{
Display("There is no need for that.");
}
}

For some reason the game ignores cEgo.ChangeRoom(27, 900, 900);, displays the message afterwards, and then gets stuck on WAIT. What on Earth is Wrong here?
#18
In my game you need to press a button to open a door in another room but when I put that in the script and start playtesting it says the object is undefined because it is not in that room. How do I make something in one room affect something in another?
#19
I keep getting this error when I try to play my game where it says room22.asc(80): Error (line 80): Nested functions not supported (you may have forgotten a closing brace)
but my line looks like this:
function hSlot2_Talk()
What is wrong?!?
#20
In my game you gain a suit that your character has to wear to procedd. However I am running into problems while getting my character to talk. Is it possible to change the talking view?
SMF spam blocked by CleanTalk