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

#1
Hello, I am implementing my game to have two playable characters, which I have the character switching portion of the code working fine. But I want them to follow each other, particularly in a Hiveswap act 2 manner, (a more classic, but not as accurate to my scenario, example might be how Sam & Max: Hit the Road do it) where the non-active player follows the active player, until switched.

my code so far is this:
Code: ags
     else if (keycode == eKeyF1)
    if (player == cEgo) {
      cRoger.SetAsPlayer();
      cEgo.FollowCharacter(cRoger, 0, 20);
    }
    else if (player == cRoger){
      cEgo.SetAsPlayer();
      cRoger.FollowCharacter(cEgo, 0, 20);
    }
I have two problems:

1. They do not start to follow each other until F1 is actually pressed, which yeah, duh, its on function on_key_press, so no surprises there. I tried putting the (FollowCharacter portion of the) code into the function repeatedly_execute(), which did work, but I did not think this was code that needed to be ran repeatedly. What would be the proper way to make the character automatically start following each other when the game starts?

2. When they do follow each other, they get get a bad case of rubberbanding. As in, the active player character will move, the non-active player character will follow behind, and then the active player character in front will course correct, and move backwards to follow the non-playable character, even though they shouldnt be following them since the non-playable character should be the only one following anybody.

Any help is greatly appreciated, thank you so much for your help!!!! :D
#2
Hello, I have begun work on a new game, and most of my endeavors in the past were with Thumbleweed, so I am like a fish out of water in this Sierra environment.

I am wanting to add a few custom verbs for this game, not sure about all of them just yet, but one I have thought of is a "Sniff" verb, basically allowing the character to smell things (this isnt just useless flavor text, i have thought of several puzzle ideas for it, i do know excessive verbs like this get a bad rep). So far, I have created a little nose icon for the cursor, and the mouse detects it when scrolling through all of the cursor types, which is a good sign so far. However, when I click on anything with the Smell verb active, nothing happens!

I have the cursor named "Sniff", and the room code for a test is as follows:

Code: ags
function cEgo_Sniff()
{ 
Display("Smells like... Blueberries?");
}
and
Code: ags
function hGlowingOrb_Sniff()
{ 
Display("Smells a bit burnt...");
}

I cannot for the life of my find out where in the scripts verbs/actions are handled, so I cant even cross reference my new cursor with one that already works, like say "LookAt". Any help at ALL would be greatly appreciated, thank you so much!!!!
#3
Hello, I am tinkering with AGS again after a few years. I was wanting to make a Verbcoin system with a few special actions, not just the default "Look, talk, Pickup, Interact". I specifically wanted to use a "Sniff" action, and have created a simple nose icon in which I want to use in the Verbcoin. In the room hotspots, I used Usermode 1 to act as a Sniff command (From what I read, the usermodes are how you utilize unique actions, but please correct me if I am wrong.) with the room code being:

Code: ags
function hGlowingOrb_Sniff()
{
  player.Say("It has a sort of burnt smell to it.");
}

I could not find much documentation regarding Verbcoin GUI in the manual, and even less for the Usermodes. What do I need to do to add my custom Sniff graphic to the Verbcoin? Is Usermodes even the correct way to add custom actions like what I'm wanting? Where in the scripts is the Verbcoin handling so I can modify it?

Thank you so much for your time!
#4
Hello! I'm a TOTAL newbie with AGS, I downloaded it earlier today, so I'm sorry if this is a stupid question I'm asking lol.

So, in my game, what I'm trying to do is make my character pick up a pillow on their bed and add it to their inventory (I got that working) and then be able to USE the pillow on the bed to put it back and remove it from the inventory.
The problem is that it wont leave the inventory when I USE it on the bed!
(I'm using the TumbleWeed template, if that helps any.)
Code: ags
function oBed_UseInv()
{
 if (player.ActiveInventory == iPillow) {
   player.Say("Fine, I'll make my bed!"); 
   player.LoseInventory(InventoryItem iPillow);
   oPillow.Visible = true;
   }
 }


He also says "That won't do any good." after trying to USE the pillow on the bed as well, and I'm not sure how to fix that either.

I've been able to Google search previous problems, but I've been having trouble finding a solution to this. I'm also not the best at coding lol.

Thank you!!!!  ;-D
SMF spam blocked by CleanTalk