Author Topic: I have 2 problems, maybe more  (Read 3769 times)

0 Members and 1 Guest are viewing this topic.

Offline FastaKilla

I have 2 problems, maybe more
« on: April 09, 2003, 06:58:21 PM »
1. I don't know how to have it bring up the inventory item view when you type 'look/pumpkin'
I have the 'pumpkin' item working, I followed the tutorial.  It is something in the global said statements in the main script right?  Does it use InspectObj or something else?
At the bottom of main script I have
(instance {pumpkin} of Iitem
   (properties
      said 'pumpkin'
      description
             "This is a pumpkin."
      view 14
   )
)


2. I have a view of a person, and I have a close-up pic and I have that working ok.  The view disappears when I type 'back' though and go back to the room.  It comes back if I leave the room and come back though.
Also, how can I get the view to play loop 2 when I type 'talk/man'  ?  (loop 1 is a still pic, loop 2 is the animation of him talking)


I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline Eric Grygier

Re:I have 2 problems, maybe more
« Reply #1 on: April 09, 2003, 10:05:21 PM »
1. Did you put something like this in the header file?:
// Inventory Items
(define INV_ Pumpkin          0)// save don't compile

« Last Edit: April 09, 2003, 10:12:11 PM by Eric Grygier »

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #2 on: April 10, 2003, 12:57:25 PM »
Yes, I already did that, in game.sh (that's the header file, right?)  I have

// Inventory Items
(define INV_NOTHING           0)
(define INV_PUMPKIN           1)
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline Eric Grygier

Re:I have 2 problems, maybe more
« Reply #3 on: April 10, 2003, 05:56:41 PM »
1. Yes, it is. It should be working. Are you testing this through a saved game? You need to reenter the room or start a new game, if you made changes to the script.

Offline Wilco

Re:I have 2 problems, maybe more
« Reply #4 on: April 10, 2003, 06:32:25 PM »
Make sure you compile each and every script that you made changes to before you re-enter your game! I found this out the hard way - was having lots of problems because I wasn't saving pictures and scripts to the resource properly.
__________________
***Cat's Quest***
---Coming (Not So) Soon!---
__________________

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #5 on: April 10, 2003, 07:18:28 PM »
I compile and rebuild all the time.  That's not the problem.  Do I have to change something from the INV script?
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #6 on: April 10, 2003, 07:42:38 PM »
Should I just make an icon print?

I can have 'look/pumpkin' for the room and use if/else for whether or not you have it or not, then make a global 'look/pumpkin' in the main script and use another if/else.  Then if you do have the pumpkin use an icon print.  Should I just try that?
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline Wilco

Re:I have 2 problems, maybe more
« Reply #7 on: April 10, 2003, 08:28:48 PM »
how can I get the view to play loop 2 when I type 'talk/man'  ?  (loop 1 is a still pic, loop 2 is the animation of him talking)

I'm also just experimenting with this only now, but what I did last night was put another instance using the same view at the bottom of my roomScript, but set it to loop 2 of that view. Then you can call this instance from within an "if(Said" statment to initialise it. Of course the man will have to be temporarily hidden, so I inserted a "hide()" statement. Something like this:

(if(Said('talk/man))
  (aMan2:
    init()
    setCycle(End)
    setSpeed(2)
  )
  (aMan:hid())
)

But this is just my solution, I still haven't figured out how to make the initial character reappear after my animation has finished.
__________________
***Cat's Quest***
---Coming (Not So) Soon!---
__________________

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #8 on: April 16, 2003, 01:05:32 PM »
I made icon prints for the items, so that is out of the way, but I have another question.
What do you type to take something out of your inventory? like the opposite of

(send gEgo:get(INV_PUMPKIN))

Will this be a problem though?  Won't it mess up everything I have such as

(if(Said('look/pumpkin'))
            (if(send gEgo:has(INV_PUMPKIN))
            Print(
                "This is a pumpkin."
                #title "Pumpkin"
                #icon 14 0 0
            )
            )(else
                Print("There is a weird looking pumpkin on the ground.")
            )
        )
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline Eigen

Re:I have 2 problems, maybe more
« Reply #9 on: April 16, 2003, 01:33:24 PM »
To drop an inventory object:

(send gEgo:put(INV_PUMPKIN))



-Eigen
Artificial Intelligence Competition

Offline Brian Provinciano

Re:I have 2 problems, maybe more
« Reply #10 on: April 16, 2003, 04:21:43 PM »
The reason "look <item>" is not automatic is because most sierra games have custom messages and events on the "look" phrases.

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #11 on: April 16, 2003, 10:32:54 PM »
Thanks.
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html

Offline FastaKilla

Re:I have 2 problems, maybe more
« Reply #12 on: April 20, 2003, 09:09:17 PM »
Now I have more questions.  First, how can I have it go to a room, play the loop of a view just once, then go back to the original room?  For an example, you can use

view.026
original room pic.026  (same script #)
pic with animation pic.027
trigger for playing animation is 'look/glass'

I want you to be able to do this only once.
Also, I think I'll need to type these, but where in the script would I put them?
ProgramControl()
Code:PlayerControl()


My other question is about 2-word things.
How can I have something like baking soda in the vocab?
I don't have a homepage, but I have this
http://www.gamefaqs.com/features/recognition/19253.html


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.042 seconds with 21 queries.