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

#1
So I have been getting back into the swing of things with AGS and my game is coming along nicely. Lots of new things learned and implementing some of my old knowledge. I'm not great with coding, but I understand enough to get what I need done.

A ln idea hit me the other day with my game. What if the Unhandled() function in the template allowed for multiple random responses? Currently the template only gives a one answer response. These are nice and help to make coding a little easier. However, I thought it would be a nice personal touch to have make the responses vary a bit.

For example: Say the room has a cup as a hotspot. The code for the room and that hotspot look like this:

Code: ags
function hcup_AnyClick()
{
    // LOOK AT
    if (Verbs.UsedAction(eGA_LookAt)) {
        player.Say("It's a blue cup.");
    }
    // USE
    else if (Verbs.UsedAction(eGA_Use)) {
        player.Say("I'd rather pick it up.");
    }
    // PICKUP
    else if (Verbs.UsedAction(eGA_PickUp)) {
        player.Say("Okay.");
        Verbs.AnyClickWalkLookPick(108, 100, eDir_Up, "You are now mine.",oCup.ID, iCup);
    }
    //USE INV
    else if (Verbs.UsedAction(eGA_UseInv)) {
        Verbs.Unhandled();
    }
    // don't forget this
    else Verbs.Unhandled();
} 

Under the "(Verbs.UsedAction(eGA_UseInv)" there is "Verbs.Unhandled()" which causes the player to say something like "I don't wanna do that." And it will say that every time the player uses an inventory item on the cup hotspot.

I was able to find the default responses in the "TemplateSettings" script. What I would like to do is modify the script so that I can add a few more lines of dialogue that will give some variety to the default Unhandled function.

For example instead of the player just saying "I don't wanna do that." They will say "These two things don't work together." or "I feel like that is a bad idea." or "probably not gonna work." And each time the player tries to use an inventory item on the cup they get a different random response from these options.

This is what I added to the "TemplateSettings" script:

Code: ags
// Function to get a random response for each verb
String GetRandomUseResponse() {
    int index = Random(7);
    if (index == 0) return "That doesn't work like that.";
    if (index == 1) return "Yeah... no. That's not gonna do anything.";
    if (index == 2) return "If this is supposed to work, I'm clearly missing something.";
    if (index == 3) return "I could try, but I'd just embarrass myself.";
    if (index == 4) return "That makes about as much sense as a screen door on a submarine.";
    if (index == 5) return "Sure, let's just combine random things and hope for the best!";
    return "I'd have better luck just staring at it until something happens.";
}

String GetRandomLookResponse() {
    int index = Random(7);
    if (index == 0) return "It looks... like a thing.";
    if (index == 1) return "Yup, that's definitely what that is.";
    if (index == 2) return "I see it, but what am I supposed to do with it?";
    if (index == 3) return "Looking at it harder isn't going to help.";
    if (index == 4) return "Cool. Now what?";
    if (index == 5) return "Great. I've observed it. Achievement unlocked.";
    return "It's there, I'm here. What a time to be alive.";
}

String GetRandomPickupResponse() {
    int index = Random(7);
    if (index == 0) return "It's not really something I need.";
    if (index == 1) return "It's probably better off where it is.";
    if (index == 2) return "I'd love to, but my pockets aren't that big.";
    if (index == 3) return "Look, I have a problem, but I'm not hoarding random junk level yet.";
    if (index == 4) return "I swear, if I pick up one more useless thing, I'm legally a pack mule.";
    if (index == 5) return "Oh sure, let me just put that in my magic bottomless pockets.";
    return "One day, I'll figure out where all this stuff actually goes.";
}

String GetRandomPushResponse() {
    int index = Random(7);
    if (index == 0) return "Why am I pushing random things?";
    if (index == 1) return "That doesn't seem like the kind of thing to push.";
    if (index == 2) return "I don't think brute force will solve this one.";
    if (index == 3) return "This would be easier if I worked out... which I don't.";
    if (index == 4) return "This is how you start unnecessary lawsuits.";
    if (index == 5) return "Because randomly pushing stuff is the mature solution.";
    return "If something explodes, I did not do it.";
}

String GetRandomPullResponse() {
    int index = Random(7);
    if (index == 0) return "I don't think that's how this works.";
    if (index == 1) return "I don't want to break anything... yet.";
    if (index == 2) return "Pulling on things randomly is not a solid strategy.";
    if (index == 3) return "If it hasn't moved by now, it probably isn't going to.";
    if (index == 4) return "Somehow, I doubt that'll make my life easier.";
    if (index == 5) return "Maybe if I pull harder it'll magically work?";
    return "I'd look pretty dumb yanking on that for no reason.";
}

String GetRandomTalkToResponse() {
    int index = Random(7);
    if (index == 0) return "It's not much of a conversationalist.";
    if (index == 1) return "I could talk, but I doubt I'd get a response.";
    if (index == 2) return "I think I'd get better conversation out of a brick wall.";
    if (index == 3) return "I'd feel weird talking to that.";
    if (index == 4) return "I talk to myself enough already. I don't need this too.";
    if (index == 5) return "I could try, but even I have limits.";
    return "Hey there, inanimate object. ...Nope, still feels weird.";
}

String GetRandomGiveToResponse() {
    int index = Random(7);
    if (index == 0) return "I don't think that's a fair trade.";
    if (index == 1) return "I doubt they'd want that.";
    if (index == 2) return "That doesn't seem like the kind of gift someone would appreciate.";
    if (index == 3) return "I'm just handing things to people now? Is that a thing I do?";
    if (index == 4) return "I'll keep it for now. Maybe I'll meet someone desperate enough to take it.";
    if (index == 5) return "Because randomly giving people stuff always works out in my favor.";
    return "I'd love to see their reaction. Just not enough to actually do it.";
}

// Function to set up random unhandled responses
function SetupUnhandledVerbResponses() {
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledUse]      = GetRandomUseResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledUseInv]   = GetRandomUseResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledLook]     = GetRandomLookResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledLookChar] = GetRandomLookResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPickup]   = GetRandomPickupResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPickupChar] = GetRandomPickupResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPush]     = GetRandomPushResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPushChar] = GetRandomPushResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPull]     = GetRandomPullResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledPullChar] = GetRandomPullResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledTalkTo]   = GetRandomTalkToResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledTalkToChar] = GetRandomTalkToResponse();
    Verbs.VerbGuiUnhandled[eVerbGuiUnhandledGive]     = GetRandomGiveToResponse();
}

/***********************************************************************
 * game_start()
 ***********************************************************************/
function game_start()
{
    set_options(); // Keep existing Tumbleweed settings
    SetupUnhandledVerbResponses(); // Apply the new randomized responses
}

This works but when I run the game and use one of the verbs that is coded as Unhandled I only get one of the predetermined responses every time for the rest of the game. If I stop the game and start it again I will get a different predetermined response for every time that verb is used with the Unhandled function for the rest of the game.

Is there a way to properly do what I am asking?
#2
I am currently using the Tumbleweed template and just started using the doors function. I am wanting to add and animation of my player reaching out to open the door, and then the door object will be visible. But I don't know how to make those things happen in that sequence. Is there a way to add that option to the function or is there another way?
#3
So I am working on an idea for a game and one of the characters items is a camera. I thought that within the game you could take pictures of things in the game and look at these pictures to assist in solving puzzles. So my question is if it is possible to take a screenshot in the game and recall it to look at it later in the game?
#4
i am looking for this
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=356

for it has gone the way of the lounge lizards ???
#5
Critics' Lounge / [WIP] Character for game
Fri 05/08/2011 14:49:14
#6
So i have this dilemma. i have an idea for a game that i want to make, i have the basic direction that i want to go with it, but every time i try to figure out how to insert puzzles into the game i get stuck. i cant for the life of me figure out how you guys make such great puzzles that go with the story so well. so i am asking: what are your techniques in implementing puzzles into your games?
* Mods Edited slightly misleading topic title
#7
i need to enlist a few of you MIDI magicians to remake some of the original COMI music into MIDI format
anyone that is interested please pm me or reply to his post. Thanx
#8
So since i am making/demaking a classic lucasarts game i thought it would be fun to post other remakes, demakes, and sequels of other classic adventure games.

Demakes:

The Curse of Monkey Island: Classic Edition
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=42299.0

Remakes:

Maniac Mansion DOTT Style
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=39250.0

Maniac Mansion Deluxe
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=401

Black Cauldron Remake:
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=451

King's Quest I VGA:
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=36

King's Quest II+ VGA:
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=144

King's Quest III:
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=734

Sequels:

Forge: Loom Sequel
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=40526.0

these are just a few examples, so if you guys could post some more i could add them to the list
#9


THE CURSE OF MONKEY ISLAND: OLD SCHOOL EDITION DEMO

This is a fan-made remake (or demake if you will) of the classic Lucasarts game "The Curse Of Monkey Island", the third installment of the Monkey Island series. The aim of this game is to give fans of the original game an idea of what the game would have been like had Lucasarts made it wih the same version of the SCUMM engine, art and animations as "The Secret of Monkey Island" and "Monkey Island 2: LeChuck's Revenge".  Currently I am just working on the free demo that you can download here, but I would love to continue to do the entire game.

For current information and updates on the progress of this project please visit my blog at cmioe.blogspot.com/

If you would like to help in the development of this project, I am currently looking for:

   Background artists
   Spriters
   MIDI Musicians

If your interested in helping in these or other areas please feel free to contact me via pm or email at the following address:
   
   Jackpumpkinhead@writeme.com.

Thanks for your support and have fun!!!

v. 0.1.0.0 (Newest)

Installer Version:
Download Here

ZIP Version:
Download Here


[Screenshots]



Progress:

Story: 100%  :)
Scripting: 95%
Graphics: 95%
Sound/Music: 50%

read an interview for the game at Indie Game Magazine
SMF spam blocked by CleanTalk