Help me get my GRILL on

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:smile: :sad: :eek: :shock: :cool: :-x :razz: :oops: :evil: :twisted: :wink: :idea: :arrow: :neutral: :mrgreen:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Help me get my GRILL on

Re: Help me get my GRILL on

by Ice Cream Jonsey » Mon Dec 11, 2023 2:00 pm

Yeah. Good point, new guy.

Re: Help me get my GRILL on

by pinback » Mon Dec 11, 2023 1:16 pm

Nobody did.

Re: Help me get my GRILL on

by exclaimseamstress » Mon Dec 11, 2023 11:25 am

Didn't got this forum.

Re: Help me get my GRILL on

by pinback » Thu Mar 05, 2020 7:52 pm

Re: Help me get my GRILL on

by Tdarcos » Thu Mar 05, 2020 2:23 pm

Wasn't there a movie about that? A woman whose grill was stolen: How Stella Got Her Grill Back.

Re: Help me get my GRILL on

by Jizaboz » Tue Mar 03, 2020 11:33 pm

I meant to mention a few days ago I'm glad you handled attempting just walking away from the grill as well. Already moved onto adding status change per eating. Thanks again!

Re: Help me get my GRILL on

by Roody_Yogurt » Mon Jan 27, 2020 1:03 pm

It's true that normally, if you want something to act as both a container and platform (like a standalone safe that you can also set things on), you'd want to use Kent Tessman's "supercontainer" addition as Hugo has no built-in support for keeping track of which objects are on the object and which are inside. In some cases, like this one, you might use both "container" and "platform" just to help with player commands (as it will accept both >PUT CARCASS IN PIT and >PUT CARCASS ON GRILL).

Re: Help me get my GRILL on

by Tdarcos » Thu Jan 23, 2020 4:08 pm

By the way, I believe the manual says you're not supposed to give an object both PLATFORM and CONTAINER attributes at the same time as they are conflicrting. I think for a grill you'd want only attribute platform.

Re: Help me get my GRILL on

by Jizaboz » Wed Jan 22, 2020 1:21 pm

I knew Roody would come to the rescue. Thank you man! I'll try this out soon. Your code makes sense, but I never would have figured out the known attribute thing by myself.

Re: Help me get my GRILL on

by Roody_Yogurt » Wed Jan 22, 2020 5:59 am

The short answer is, you have to give the meat the known attribute or else Hugo doesn't know the player knows about it yet.

I re-coded the example just to verify (I changed a few things to not rely on some of your defined things):

Code: Select all

player_character you "you"
{
}

object carcass "carcass"
{
	article "a"
	noun "carcass"
	in you
	long_desc
		"Mmmm, carcass."
	size 1
}

object meat "cooked meat"
{
	article "some"
	adjective "cooked"
	noun "meat"
	long_desc
		"Mmmm, cooked meat."
	before
	{
		object DoGet
		{
			Deactivate(cook_daemon)
			return false
		}
	}
}

room STARTLOCATION "By the Fire Pit"
{
	e_to test_room
	initial_desc
		"This fire is always at least smouldering so long as everyone finds brush
		and waste in the perimeter to keep it going. This is where everyone comes
		to cook anything they can't cook elsewhere. It's rare you see anyone out
		here cooking anything though, as food as very scarce and when anyone gets
		good food they cook it however they can closer to their house so others
		won't bother them."
	long_desc
		"You are standing in front of a fire pit of cinder blocks with a
		makeshift grill composed of some metal grating and wire. There is no one
		else here at the moment."
	before
	{
		location MovePlayer
		{
			if cook_daemon is active
			{
				"Not while the carcass is cooking!"
				return true
			}
			return false
		}
	}
}

room test_room "Test Room"
	{
		long_desc
			"Just testing MovePlayer here."
		w_to STARTLOCATION

	}
daemon cook_daemon
{
	timer 0
}

event cook_daemon
{
	self.timer++
	select self.timer
		case 3
		{
			Indent(true)
			"The meat is smelling really good and making your stomach
			growl loudly."
			move meat to firepit
			meat is known
		}
		case 5
		{
			Indent(true)
			"You smell burnt meat. There wasn't much of it to begin
			with, so you discard the charred remains into the fire."
			remove meat
			event_flag = true
			Deactivate(cook_daemon)
		}
}

scenery firepit "firepit"
{
	nouns "firepit" "grill" "fire" "pit"
	in STARTLOCATION
	is platform
	is container
	holding 0
	capacity 2
	article "the"
	long_desc
		"The fire blazes along. There's a makeshift grill in one corner of it
		you can place things on to cook."
	before
	{
		xobject DoPutIn
		{
			if object ~= carcass
				"You have no desire to try to cook that."
			else
			{
				"You place the meat on what looks like the cleanest part of the
				grill."
				Activate(cook_daemon)
				return false
			}
		}
	}
	after
	{
		xobject DoPutIn ! since the only thing that works is the carcass
		{

			"\nYou hear a sizzling sound."
			remove carcass
		}
	}
}

scenery cinderblock "cinderblock"
{
	nouns "cinderblock" "block"
	in STARTLOCATION
	article "the"
	long_desc
		"The fire blazes along. There's a makeshift grill in one corner of it you
		can place things on to cook."
}

Help me get my GRILL on

by Jizaboz » Tue Jan 21, 2020 9:35 pm

I was messing with this for about half an hour again tonight after a long break, and it's still driving me nuts. I can't take the meat. I can't see the meat once on the grill at all. Note that the burned phase works just fine. I can ruin the meat, but I can't remove it before it's ruined haha

Code:

Code: Select all

!----------------------------------------------------------------------------
! Pit
!----------------------------------------------------------------------------

room pit " By the Fire Pit"
{
	s_to {currentpicture = "barbwire"
        return muddy_dirt
	}
	long_desc
	{
	if self is not visited
		{
			indent (true)
			"This fire is always at least smouldering so long as everyone finds brush and waste in the perimeter to keep it going. This is where everyone comes to cook anything they can't cook elsewhere. It's rare you see anyone out here cooking anything though, as food as very scarce and when anyone gets good food they cook it however they can closer to their house so others won't bother them."
		}
		currentpicture = "firepit"
		indent (true)
		"You are standing in front of a fire pit of cinder blocks with a makeshift grill composed of some metal grating and wire. There is no one else here at the moment."
	}
	each_turn
	if GameEvents[12] = 1
				{
					select RoomTurnCount
						case 3 : 
					{"The meat is smelling really good and making your stomach growl loudly."
						move meat to pit
					}
						case 5 : "You smell burnt meat. There wasn't much of it to begin with, so you discard the charred remains into the fire."
						move meat to cage
				}
}

scenery firepit "firepit"
{
	nouns "firepit" "grill" "fire" "pit"
	in pit
	is platform
	is container
	holding 0
	capacity 2
	article "the"
	long_desc
		{
		"The fire blazes along. There's a makeshift grill in one corner of it you can place things on to cook."
		}
		
		
		before {
                xobject DoPutIn {
                        if object ~= carcass
                                "You have no desire to try to cook that."
                        else
						{
							indent(true)
						     "You place the meat on what looks like the cleanest part of the grill."
						return false
						}
			}
				}
        after
        {
                xobject DoPutIn ! since the only thing that works is the carcass
                {
					"You hear a sizzling sound."
					GameEvents[12] = 1
					remove carcass
                }
        }
}

scenery cinderblock "cinderblock"
{
	nouns "cinderblock" "block"
	in pit
	article "the"
	long_desc
		{
		"The fire blazes along. There's a makeshift grill in one corner of it you can place things on to cook."
		}	     
}

Behavior in game:

Code: Select all

By the Fire Pit
  
  This fire is always at least smouldering so long as everyone finds brush and waste in the perimeter to keep it going. This is where 
everyone comes to cook anything they can't cook elsewhere. It's rare you see anyone out here cooking anything though, as food as 
very scarce and when anyone gets good food they cook it however they can closer to their house so others won't bother them.

  You are standing in front of a fire pit of cinder blocks with a makeshift grill composed of some metal grating and wire. There is no one 
else here at the moment.

>put carcass on grill

  You place the meat on what looks like the cleanest part of the grill.
You hear a sizzling sound.

>look at grill
The fire blazes along. There's a makeshift grill in one corner of it you can place things on to cook.

>wait
Time passes...
The meat is smelling really good and making your stomach growl loudly.

>take meat
You haven't seen anything like that.

>take carcass
You don't see that.

>SHIT
You don't need to use the word "shit."


Top