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

#1
So I am trying to put everything together and get the double click to skip to changing a room like in the monkey island games.

From what I understand I need to do something like this in the room script:

Code: ags
void repeatedly_execute_always()
{
  if(DoubleClick.Event[eMouseLeft]) 
  {
      SkipUntilCharacterStops(player.ID)
  }
}

Then in my hotspot anyclick function I would have something similar to this?:

Code: ags
function hDoor_AnyClick()
{
  if (DoubleClick.Event[eMouseLeft]) 
  { 
    player.ChangeRoom(6, 280, 155, eDirectionLeft);
  }
  else
  {
    player.Walk(282, 173, eBlock); 
    player.ChangeRoom(6, 280, 155, eDirectionLeft);
  }
}

#2
I see that there is a double click module that is bundled with the Tumbleweed template. I am assuming this is for the exit extensions. Is there any way to use the double click module without the exit extension?
#3
@Khris

So I am running into a new problem. I have a few lines of dialog that use the "%s" placeholder for objects, hotspots and characters. But when this code that you gave me is implemented in the game I the player says "%s" instead of the object, hotspot or character.

example:
Code: ags
String GetRandomLookResponse() {
    int index = Random(7);
    if (index == 0) return "It looks... like a thing.";
    if (index == 1) return "Yup, that's definitely a %s.";          //<-------This is the line that I want the %s to insert the object, hotspot or character
    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.";
}

Then when I use the "Look At" verb on say a trashcan in the game, the player should say: "Yup, that's definitely a trashcan."

But instead he says: "Yup, that's definitely a %s."

is there a way to fix it so that the "%s" placeholder works in this case?


EDIT:
It seems that this works fine with Characters, but not hotspots or objects
#4
Quote from: Khris on Fri 21/03/2025 09:35:11Open VerbGui.asc, scroll down to line 1980 and use this:

Code: ags
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.";
}

void ShuffleUnhandled() {
  verbsData.unhandled_strings[eVerbGuiUnhandledLook] = GetRandomLookResponse();
  // verbsData.unhandled_strings[eVerbGuiUnhandledUse] = GetRandomUseResponse();
  // ...
}
 
static void Verbs::Unhandled(int door_script) 
{
  ShuffleUnhandled();
  InventoryItem*ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  int type=0;
  if (verbsData.location_type == eLocationHotspot)   type = 1;

(At the bottom is the top of the existing Verbs::Unhandled function, with the added ShuffleUnhandled() line.)
Quote from: Khris on Fri 21/03/2025 09:35:11Open VerbGui.asc, scroll down to line 1980 and use this:

Code: ags
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.";
}

void ShuffleUnhandled() {
  verbsData.unhandled_strings[eVerbGuiUnhandledLook] = GetRandomLookResponse();
  // verbsData.unhandled_strings[eVerbGuiUnhandledUse] = GetRandomUseResponse();
  // ...
}
 
static void Verbs::Unhandled(int door_script) 
{
  ShuffleUnhandled();
  InventoryItem*ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  int type=0;
  if (verbsData.location_type == eLocationHotspot)   type = 1;

(At the bottom is the top of the existing Verbs::Unhandled function, with the added ShuffleUnhandled() line.)

OMG! This works. Thank you so much. I still don't know why it's not built into the template. But whatever.
#5
Thank you for the response. I wish that I could say that I completely understand what you are saying, but as I mentioned in the beginning of the post, I'm not that great with coding. Array's are still a bit of an enigma to me. I know that I posted this in the Technical Questions forum. But I am probably more of a beginner.
#6
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?
#7
Anyone just have this prebuilt that I can use??
#8
Quote from: Kara Jo Kalinowski on Sat 15/02/2025 00:04:06
Quote from: Jackpumpkinhead on Fri 14/02/2025 23:42:50I love this template. However, I wish there were more animation options, especially in the Doors and the AnyClickWalkLookPick functions. Since these functions overwrite any other actions they are kind of useless if you don't have many animations. But to have an animation of the player opening the door or the player bending down to pick something up would be ideal.

I don't know if you saw my reply to you on your support thread or on the discord, but I've coded the solution for Doors and explained how to use it. You would have to do something similar for any other thing you wanted animations for. That's here for anyone else wanting to see what I changed, which adds animations before opening, closing, or using items on doors: https://www.adventuregamestudio.co.uk/forums/index.php?msg=636681453

I think that Tumbleweed is good if you only want to use Tumbleweed but I don't like how integrated everything is with each other - I'd much prefer a more lightweight LucasArts GUI.

yeah I saw, It would just be nice if there was an option for animation.
#9
I love this template. However, I wish there were more animation options, especially in the Doors and the AnyClickWalkLookPick functions. Since these functions overwrite any other actions they are kind of useless if you don't have many animations. But to have an animation of the player opening the door or the player bending down to pick something up would be ideal.
#10
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?
#11
I am using the Tumbleweed template for my game and I just got started. In the VerbGUI.asc script it says "Please do not edit these options directly anymore, but use the VerbGuiSettings settings script instead!" Where is that? Also is this version what is included with AGS 3.6 or do I need to update?
#12
i was just wondering if you had made anymore progress on this or not
#13
Edger

Yo sólo quería hacerte saber que recibí un correo electrónico que pueden ayudarle con su problema de fondo de arte.
Aquí está el correo electrónico:

Hola, me presentare, me llamo Rafael González, y actualmente estoy terminando bellas artes.

Menuda buena noticia me he llevado cuando he visto que estáis buscando un dibujante para el proyecto de Monkey Island, yo mismo tambien intente empezar una aventura 100% original y como bien dices tengo un guión y un desarrollo, pero por encima de eso lo que me encantaría es rendirla homenaje a esta grandiosa obra.

Tengo un blog con unas cuantas imágenes del proyecto que comencé, también se trabajar en pixel y sobre todo en original ( acuarelas con retoques o rotuladores, como en su momento se realizo el MI2)

http://poxitan.blogspot.com/

Me encantaría poder formar parte de vuestro equipo y quien sabe si poco a poco abrirnos paso en el mundo de los videojuegos.

Un saludo Poxi

rafiki1987@hotmail.com
PoxiGonzalez@yahoo.es

Pensé que este hombre podría correo de alguna ayuda para usted en acabado / pulido el juego. Y puesto que tanto hablan español, se puede comunicar una gran cantidad de lo que mejor y yo

Espero que esto ayude
Josh



IN ENGLISH

Edger

I just thought i would let you know that I received an email that may help you with your background art problem.
Here is the email:

Hola, me presentare, me llamo Rafael González, y actualmente estoy terminando bellas artes.

Menuda buena noticia me he llevado cuando he visto que estáis buscando un dibujante para el proyecto de Monkey Island, yo mismo tambien intente empezar una aventura 100% original y como bien dices tengo un guión y un desarrollo, pero por encima de eso lo que me encantaría es rendirla homenaje a esta grandiosa obra.

Tengo un blog con unas cuantas imágenes del proyecto que comencé, también se trabajar en pixel y sobre todo en original ( acuarelas con retoques o rotuladores, como en su momento se realizo el MI2)

http://poxitan.blogspot.com/

Me encantaría poder formar parte de vuestro equipo y quien sabe si poco a poco abrirnos paso en el mundo de los videojuegos.

Un saludo Poxi

rafiki1987@hotmail.com
PoxiGonzalez@yahoo.es

I figured this guy might e of some help to you in finishing/polishing up the game. And since you both speak Spanish, you could communicate a lot better than you and I.

I hope this helps
Josh
#14
Glad to see someone has picked up where i left off
if you need help Edger you know how to contact me
;)
#15
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?
#16
AGS Games in Production / Re: The Rail
Fri 25/11/2011 18:37:35
i am interested in playing this one, but i am still waiting for the latest Technobabylon ;D
#17
Quote from: DutchMarco on Sun 06/11/2011 15:11:16
I found MI1 to be aesthetically superior to MI2, esp. the early chapters of MIO2 looked a bit yucky, but it was cool that they usedmore than MI1's 16. I've never played CMI, but from what screenshots I've seen, your style is nicer (although I understand the comment of MI1 having more refined use of colour. Having said that: This effort gets a lot of applause from me, please bring it to fruition! And well done so far!

There's just one thingy I've noticed so far (debatable whether this should go in hints & tips or here:)

After having accidentally shot at the fortress 1x and then the 3 boats, and made the gaff, the pirates' remains don't come floeting near the ship - have I mucked up my sequence of actions?)


unforutunatly i cant find anywhere in the code that causes this problem
also i have stopped development on this project so mods can close this
if anyone would like to continue this though you can find the raw files on my blog
thanx for all of the help and support
#18
unfortunately i dont have an update for this yeah. but i will look into the bug and update asap
#19
this is amazing!!!!

@Peder Johnsen+:

Here are the songs from the game (The Official Soundtrack ;D)


1. Draculator II - Theme


2. Title Screen


3. Merrick Explores


4. Vamp Twins


5. RoboFight!
#20
Quote from: Tabata on Thu 27/10/2011 20:30:01
I am playing in fullscreen whenever possible, so this might be the reason, why I don't have probs with pixelhunting.
The telephone scene is highly powerful and I really like, what you made of it.

It's very impressive to see this nice little game now getting near to the final stage
and I am proud of all the swarmies and especially for the leader of the pack, who makes it possible.

Baron, you are really ... "a good daddy, swarm queen ..."                           

for sure
i am really happy with it too ;D
SMF spam blocked by CleanTalk