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 - harmonicapress

#1
So I've painted myself into a bit of a corner here. I have an object on an object, specifically a wad of gum over the peephole on a door. My character has to ask an NPC to leave the room before the main character can interact with the door or the gum. (The character must 'talk to' or eat the gum to get it off the peephole. So I set a boolean at the beginning of the script for isgumondoor = true; so that when he chews it i can set that to false and have the gum permanently disappear. The problem I'm having is that when I close the door, the gum disappears and doesn't come back when I open it. I've tried everything and I just keep getting caught in a mental loop. It's driving me bonkers, please help!
Ps if the door is closed, the gum is outside the room and should not be visible
    if the door is open the gum should be visible unless the main character has tripped the boolean by 'talking to' (or chewing) the gum.
Thanks guys


Code: ags

function oGum_Look()
{
cBingo.Say("Looks like a wad of chewing gum covering the peephole.");
}


function oGum_Interact()
{
if ( cMackey.x<500) { 
cBingo.Say("It's too sticky to grab with my fingers...");
} 
else { 
cBingo.Say("Mackey is blocking the door.");
}
}

function oOpenHotelDoor_Look()
{
cBingo.Say("It's the door to the victim's room.");
}

function oOpenHotelDoor_Interact()
{
if ( cMackey.x<500 ) { 
cBingo.Walk(590, 450, eBlock, eWalkableAreas);
oOpenHotelDoor.Visible = false;
oClosedHotelDoor.Visible = true;
oGum.Visible = false;
}
else { 
cBingo.FaceObject(oOpenHotelDoor);
cBingo.Say("Mackey is blocking the door.");
}
}

function hCSExit_Interact()
{
cBingo.Walk(569, 378, eBlock, eWalkableAreas);
cBingo.ChangeRoom(2,405,445 );
}



function hCSExit_Look()
{
cBingo.Say("It's the way back to the elevators.");
}


function oClosedHotelDoor_Interact()
{
if (isgumondoor == false) { 
cBingo.Walk(590, 450, eBlock, eWalkableAreas);
oClosedHotelDoor.Visible = false;
oOpenHotelDoor.Visible = true;
oGum.Visible = false;
}
else {
  cBingo.Walk(590, 450, eBlock, eWalkableAreas);
  oClosedHotelDoor.Visible = false;
oOpenHotelDoor.Visible = true;
oGum.Visible = true;
}}

function oGum_Talk()
{
cBingo.Say("Gross, but ok. I'll chew it off.");
oGum.Visible = false;
isgumondoor = false;
cBingo.AddInventory(iGum);

}
#2
Hey guys, I thought I had the coding right to have my character respond with a few random responses each time you examined a hotspot, for some reason it gave me a parse error when I used the example I got from the dynamic help section, I removed the else option and got the game to run but now it skips my lead character (cBingo)'s initial sentence and fires all 3 "random" sentences in one string. here is the code as I have it, with the else's foolishly removed just because that's the only way i could get the game to run while preserving most of the body of my attempted code. I'm sure this is a quick fix but I couldn't find anything in the forum archive that helped. Thanks for your time and insight!
Code: ags

function hMemos_Look()
{
int ran=Random(2);
if (ran==0) 
cBingo.Say("There's a lot of memos here...Send Mendoza Case evidence to DA's office.");
cBingo.FaceCharacter(cLucy, eNoBlock);
cBingo.Say("Lucy, they sent Carlito Mendoza to the electric chair over six months ago.");
cLucy.Say("Guess I don't need that one any more.");
if (ran==1)
cBingo.Say("There's a lot of memos here...This one looks like a shopping list. Catfood, milk, eggs, saurkraut...saurkraut? Ewwww.");
cLucy.Say("Don't you judge me, ya loafy curmudgeon.");
if (ran==2)
cBingo.Say("There's a lot of memos here...This one says: 'Remember to belittle and insult Bingo at least once a day.'");
cLucy.Say("You really are a short, fat, worthless excuse for a detective. Thanks for the reminder."); 
cBingo.Say("Ouch.");
}
#3
Trying to create a map for my character, I created a room and used objects as clickable points that change rooms. I had no problem getting the basic functions to work with cEgo.ChangeRoom but now I want a new waypoint to pop up when my character finds a particular object that provides a clue unlocking the new location. The issue I am having is that the object (a book of matches) is in another room (room 1) and the map is room 2, I tried ...
Code: ags
 
function oMatchbook_Interact()
{
cBingo.Walk(590, 450, eBlock, eWalkableAreas);
cBingo.Say("What have we got here?");
oMatchbook.Visible = false;
cBingo.Say("It says 'Club Oooo'. I better check it out.");
cBingo.AddInventory(iMatches);
oClubo.Visible = true
}

room 1 asc doesn't recognize the object in room2 used as the icon for the new location. Hints? A better system altogether? Thanks!
                                                                             
#4
I've imported a really cool font but I had to expand the # of pixels between dialog options to 5px in the general settings so the dialog options wouldn't overlap one another, now my top dialog option hangs off of a few pixels at the top of the black background, cutting off the top option. I couldn't find the dialog box gui in the gui tree or any instructions in the manual on how to change the size of that black band. A little help? thanks!!!:-X
#5
I'm making a police farse and I have a character I want to leave the room when I choose a dialog option. I tried coding cCharacter.Walk(x,y,eblock,walkableareas) in the actual dialog, but the character does not execute. Here is what my dialog looks like...
Code: ags

Mackey: What, you gonna do some weird stuff with the body?
Bingo: Gross Macky. Would you just give me some space and let me do my thing?
Mackey: Sure thing, pervert. 
  cMackey.Say("Go outside McMurphy. Secure the perimeter McMurphy. Secure this.");
  cMackey.Walk(611,396,eBlock,eWalkableAreas);


note: the area he is supposed to walk to is a walk behind (hides him)
Then I'm using if cMackey.x<612 to change how my character interacts with the door he was blocking (else my character says "mackey is blocking the door"). Does this sound like the best way to execute this set-up?

Let me simplify this by complicating it for you, Mackey is blocking the door, I have an if else statement saying if mackey x>612 say "the door is blocked" else I can manipulate the door (open door visible = false, closed door visible = true, revealing his coat hanging behind the door with a pocket full of clues. I want a dialog option that tells mackey to bug off so I can get to the door, close it and examine the coat. Pretty sure I have the open/door part down (per the tutorial), just cant get mackey to move with the dialog command function. Help!
Thanks folks!:-D
#6
I'm wondering how I would code a dialogue to run only the first time I interact with a character. The first interaction involves a long winded introduction from one character. I only want this to run the first time we meet and then I want a different dialog to play any time after that first interaction. All I could figure was that I needed to turn off all the options from the cascading introduction dialogue in which all answers lead to the 2nd dialogue, however when I removed all the options it caused the game to crash. Maybe there's an if command I can use below the @S Dialogue startup entry point??? Thanks pros.

here's my code that did not work, I just tried to turn all the options off hoping that would prevent that part of the dialog from playing...fail.

Code: ags

// Dialog script file
@S  // Dialog startup entry point
return
@1
Archie2: Step Right up! Step Right up here son! Let me take a good look at ya!
    cSam.FaceCharacter(cArchie2);
Sam: Wh-
Archie2: The name's Archibald Ferris, Ferris Goods and Wears. "There's none so fair as Ferris Wears!" Now what'd ya say your name was?
Sam: Sa-
Archie2: Oh, no matter! No matter! We're all friends here! Now whattya say friend!? Where ya headed? What'll you need? I have it all right here in my cart, guaranteed!
option-off 1
option-off 2
option-off 3
option-off 4
goto-dialog 1

@2
Archie2: Step Right up! Step Right up here son! Let me take a good look at ya!
    cSam.FaceCharacter(cArchie2);
Sam: Wh-
Archie2: The name's Archibald Ferris, Ferris Goods and Wears. "There's none so fair as Ferris Wears!" Now what'd ya say your name was?
Sam: Sa-
Archie2: Oh, no matter! No matter! We're all friends here! Now whattya say friend!? Where ya headed? What'll you need? I have it all right here in my cart, guaranteed!
option-off 1
option-off 2
option-off 3
option-off 4
goto-dialog 1

@3
Archie2: Step Right up! Step Right up here son! Let me take a good look at ya!
    cSam.FaceCharacter(cArchie2);
Sam: Wh-
Archie2: The name's Archibald Ferris, Ferris Goods and Wears. "There's none so fair as Ferris Wears!" Now what'd ya say your name was?
Sam: Sa-
Archie2: Oh, no matter! No matter! We're all friends here! Now whattya say friend!? Where ya headed? What'll you need? I have it all right here in my cart, guaranteed!
option-off 1
option-off 2
option-off 3
option-off 4
goto-dialog 1

@4
Archie2: Step Right up! Step Right up here son! Let me take a good look at ya!
    cSam.FaceCharacter(cArchie2);
Sam: Wh-
Archie2: The name's Archibald Ferris, Ferris Goods and Wears. "There's none so fair as Ferris Wears!" Now what'd ya say your name was?
Sam: Sa-
Archie2: Oh, no matter! No matter! We're all friends here! Now whattya say friend!? Where ya headed? What'll you need? I have it all right here in my cart, guaranteed!
option-off 1
option-off 2
option-off 3
option-off 4
goto-dialog 1
#7
I'm trying to run a small cutscene where my character reads a letter as soon as I interact with it. I created a the letter as a room, set my characters visibility to false and tried to use ChangeRoom to make it come up, but I keep getting the watch icon then the game crashes and tells me that there is a NewRoom command already open. I poured through the forums looking for an answer for this and couldn't find an older post with the exact same issue, most were examining letters in their inventory.
Here is my code. Thanks Gurus!

Code: AGS

function oLetter_Interact()
{
cSam.Walk(104, 178, eBlock, eWalkableAreas);
oLetter.Visible = false;
cSam.Say("Looks like it's from my brother J.B.");
cSam.ChangeRoom(5, 0, 0);
Wait(600);
cSam.ChangeRoom(cSam.PreviousRoom);
cSam.AddInventory(iLetter);
}
#8
Hey guys. I have a character selling junk who is constantly making his pitch, much like stan in the Monkey Island series, I set up timers and created a view where he waves his arms and shouts, I assigned this view as the characters speech view. The text he's supposed to be shouting comes up with the timers, but he won't animate, he just stands there ventriliquizing (shouting without moving his lips or arms). How can I get him to run the speech view with the SayBackground command, or is there another workaround? here is my code...

function room_Load()
{
  SetTimer(1, 120);
  SetTimer(2, 200);
  SetTimer(3, 280);
}

function room_RepExec()
{
  if (IsTimerExpired(1)){
    cArchie2.SayBackground("Come One! Come All!");
    SetTimer(1, 120);
}
  if (IsTimerExpired(2)){
    cArchie2.SayBackground("See my fabulous assortment of goods available for astonishingly low prices!");
    SetTimer(2, 200);
}
  if (IsTimerExpired(3)){
    cArchie2.SayBackground("There's none so fair as 'Ferris Wares'!");
    SetTimer(3, 280);
  }}
#9
Hey guys.  Still having an issue. Now that I've put in the SayBackround command, the text he's supposed to be shouting comes up with the timers, but he won't animate, he just stands there ventriliquizing (shouting without moving his lips or arms). How can I get him to run the speech view with the SayBackground command, or is there another workaround? here is my code...

function room_Load()
{
  SetTimer(1, 120);
  SetTimer(2, 200);
  SetTimer(3, 280);
}

function room_RepExec()
{
  if (IsTimerExpired(1)){
    cArchie2.SayBackground("Come One! Come All!");
    SetTimer(1, 120);
}
  if (IsTimerExpired(2)){
    cArchie2.SayBackground("See my fabulous assortment of goods available for astonishingly low prices!");
    SetTimer(2, 200);
}
  if (IsTimerExpired(3)){
    cArchie2.SayBackground("There's none so fair as 'Ferris Wares'!");
    SetTimer(3, 280);
  }}
#10
Hey guys. I'm a noob having some trouble with objects and walk behinds. I've watched the tutorial a hundred times and I'm still getting something mashed up on this one. I'm just trying to have a mailbox that I can open and grab a letter. I was able to get it to work pretty well except my character can be seen where the mailbox door is when he walks behind it. I have tried dropping in a walk behind where the object will be but then I lose my mailbox lid altogether. I know I'm just not getting some kind of priority right in the coding. Here is a look at my coding. Should there be a walk behind where I drop the objects? and how do I get my character to walk behind the objects (the mailbox door). Also I snipped images but I can't figure out a way to attach them through the forum tool panel??? It looks like it wants them posted at a web location first?



function oMailbox_Interact()
{
cSam.Walk(104, 178, eBlock, eWalkableAreas);
cSam.Say("I wonder if the Pony Express left anything today...");
oMailbox.Visible = false;
oOMailbox.Visible = true;
oLetter.Visible = true;
}

function oLetter_Look()
{
cSam.Say("Looks like I got a letter.");
}

function oLetter_Interact()
{
cSam.Walk(104, 178, eBlock, eWalkableAreas);
cSam.Say("Looks like it's from my brother J.B.");
oLetter.Visible = false;
cSam.AddInventory(iLetter);

#11
I can put another character (aside from the main character) in a room, I even got him to talk and to stop me with a "HALT" every time I try to open the door he is "guarding", but how would I make my robotic character do something like pace back and forth across the screen. I made a robot sentry with all of the views he needs for full motion, and I've placed him in the room, but he just sits in one spot. How can I make him repeat a sentry pattern? I have been skimming the tutorials and the closest answer I could find featured timers but it was only explained in the context of Mr.Donatello's speech. I realize the answer here will be fairly long and complex, a point to a previous forum page or the right Youtube tutorial will suffice. Thanks all.
UPDATE
I also tried this (see code), and got the robot(clark) to pace, but now I have no mouse cursor??? Clearly their is a cleaner, correct way to do this. Please help.

function room_RepExec()
{
cClark.Move(108, 96, eBlock, eWalkableAreas);
cClark.Move(202, 94, eBlock, eWalkableAreas);
}
#12
I want my character to open a chest, see an object in it, then pick up the object leaving the remaining chest behind. So far I have attempted this by bit-mapping 3 objects, 1. the tool chest closed, 2. the tool chest open, revealing a wrench inside, 3. I placed the tool chest as object one and set it to visible, then the open chest with the wrench as object 2, set it invisible, then the empty chest as object 3, set as invisible. The objects rest in layers upon one another in the build suite. For some reason, only a tiny area of the object is recognized by the cursor and so you have to pixel hunt like crazy to get the chest to open. I can't figure out how to make the rest of the object available to the cursor actions, and now I've changed the objects in and out a few times and the animation I set up doesn't seem to be working at all. Here is a look at my coding for the room. Any ideas?

Code: AGS
function ToolChest_Look()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("It's a ToolChest, left behind by the construction workers.");
}

function ToolChest_PickUp()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("I'm not gonna lug that thing around, but maybe there's something inside I can use...");
}

function ToolChest_Interact()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("Let's see what we have in here...");
ToolChest.Visible = false;
Wrench.Visible = true;
cKilroy.Say("A wrench! That could be useful!");
}

function Wrench_Look()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("It's a wrench!");
}

function Wrench_Interact()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("Hmmm...It might be more useful if I took it with me.");
}

function Wrench_PickUp()
{
cKilroy.Walk(269, 141, eBlock, eWalkableAreas);
cKilroy.Say("Ok monkey, your coming with me.");
cKilroy.AddInventory(iWrench);
Wrench.Visible = false;
EmptyChest.Visible = true;
}

function EmptyChest_Look()
{
cKilroy.Say("It's empty.");
}

function EmptyChest_PickUp()
{
cKilroy.Say("I'm not lugging that thing around.");

SMF spam blocked by CleanTalk