Attribute Problem

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Tdarcos
Posts: 9613
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Attribute Problem

Post by Tdarcos »

I decided to branch off and do a 'quickie' game.

I am trying to declare characters and it doesn't work right. I finally had to declare a female character as an object instead of a female_character.

Well, anyway, one of the objects has the 'female' attribute, but when I look at it, it changes and sometimes it has it and sometimes it doesn't. Also the character 'you' has the female attribute set which it shouldn't.

Here's a short piece:

Code: Select all

object Lisa "Lisa"
{
   is enterable
   is platform 
   is female 
   is living
[other new attributes]
[other new properties]
   adjective "lisa", "she", "girl"
   nouns "lisa","she", "girl"
   in room_a
   
   
}
So in Init I have

Code: Select all

	print BANNER
    
	player = you                    ! player initialization
    
    if (lisa is female)
      print " Lisa is female "

    if (lisa is not female)
      print " Lisa is not female "
I get the following

Code: Select all

Hugo v3.1 / Library 31031
Lisa is not female 
There is something that is changing things, it is like attribute bits are being reversed, I had to code-force the player to 'player is not female' to keep it from including me in code that should only work for females, e.g.

Code: Select all

verb "kiss"
    *                                                       DoKiss
    * female                                             DoKiss

So that a command like "Kiss lisa" would work but "Kiss me" would not.
Given the general rise in expenses and fall in the typical standard of living, the future ain't what it used to be.

User avatar
Tdarcos
Posts: 9613
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

I am thinking I might just take what I wrote and refactor, or rewrite, or something.

I have a dresser as scenery in the player's room, and an object on it used to read as "There is an [object name] on top of the dresser" and now it reads "It has [object name".

I think I busted something. I'm going back to pristine, as released header files then carefully mark changes. I think I'll go through and rebuild the game by starting with a blank slate and add the items and features one at a time. I think I'll go back to a game with nothing but rooms then add the objects and characters back one at a time.
Given the general rise in expenses and fall in the typical standard of living, the future ain't what it used to be.

Post Reply