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

#1
Yes, Definitely a logic issue. I tried the code supplied by matti, and the behavior definitely changed, now when I close the door, the gum floats in the air where it was when the door was open. Here is the code as I have it currently, this time I supplied both interact with closed door and interact with open door, might be easier to spot the flaw. Ps. Don't forget I have boolian set at the game start that says isgumondoor == true. Thanks for your diligence friends!
Code: ags

function oOpenHotelDoor_Interact()
{
if ( cMackey.x<500 ) { 
cBingo.Walk(590, 450, eBlock, eWalkableAreas);
oOpenHotelDoor.Visible = false;
oClosedHotelDoor.Visible = true;
if (isgumondoor == false)
oGum.Visible = false;
else oGum.Visible = true;
}
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 oClosedHotelDoor_Interact()
{
  cBingo.Walk(590, 450, eBlock, eWalkableAreas);
  oClosedHotelDoor.Visible = false;
  oOpenHotelDoor.Visible = true;
  if (isgumondoor) oGum.Visible = true;
}
#2
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);

}
#3
Beginners' Technical Questions / SOLVED
Thu 22/10/2015 22:26:31
SOLVED
Thanks to both of you. Cassiebsg, your code worked perfectly, and Thank you crimson wizard for explaining how the bracket links all following code to the if statement, really appreciate an answer with a lesson. Teach a man to fish and he wont post lame questions in the forum...or something like that:) cheers.
#4
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.");
}
#5
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!
                                                                             
#6
Using version 3.3.2, I am working with 800x600 res, here's the link to the ttf font, its called pixel noir, (so appropriate for my game:))
http://www.dafont.com/pixel-noir.font
and finally, below is the screenshot of the cutoff dialog. reminder, I already had to increase the distance between dialog options to 5px, but it was cutting it off at the top before then as well (the box actually got bigger when I increased the space between options but the top of the box still cut of the first two pxls of the 1st dialog option).
http://harmonicapress.tumblr.com/image/124427522364

Thanks!
#7
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
#8
SOLVED
Changed from walkable areas to anywhere and he took a hike. I suspect it was because someone mentioned above, he was not standing on a walkable area to begin with.
Thanks!
#9
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
#10
Genius. Same function I was wanting, cleaner approach and execution. Thank you guys again. And I will pour over the manual, I guess somehow the manual's availability had evaded me and I've been relying on the very VERY helpful youtube tutorial. Thanks for the heads up.
#11
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
#12
Awesome. Thanks Khris!  The zero's in the x y coordinates were keeping my character from returning to the previous room. SOLVED!
#13
Awesome! that worked with one little hitch...when the room fades back after the letter is read, my character is gone. How can I fix that?
#14
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);
}
#15
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);
  }}
#16
Ooops, I knew that, just clicked into the wrong forum area. Sorry :) And my original post did not include the SayBackground, now that I have changed it, the new issue is that the character does not play his speech animation loop. I would have continued the thread, but it got buried, so I figured I'd start a fresh one. I'll just re post in the older thread next time as well.
#17
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);
  }}
#18
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);
  }}
#19
Beginners' Technical Questions / RESOLVED!
Sun 08/12/2013 19:31:49
YES! I had my baseline set to the lowest pixel on the object instead of below the walk behind base line!!! I Set the objects' baselines to 177 and flip! Everything lined up like clockwork! Thank you so much!!!!
#20
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);

SMF spam blocked by CleanTalk