Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: Lancelot on January 13, 2004, 08:33:05 AM

Title: Props help needed
Post by: Lancelot on January 13, 2004, 08:33:05 AM
How can I let a NPC give ego an item but only after he talked to the NPC.
Title: Re:Props help needed
Post by: Cloudee1 on January 13, 2004, 09:40:55 AM
quick answer!

if said talk man
 if send gego has item //item from character
  Print leave me the hell alone i've given you everything i got
 else
  send gego get inv-item
  Print ahh help help here take my wallet

Title: Re:Props help needed
Post by: Lancelot on January 14, 2004, 12:14:56 PM
I did it.
It compiled succesfull but when I talk to the character I get an Sci message saying.That what I did they didn't think off and that I should take a different approuch.
Title: Re:Props help needed
Post by: Cloudee1 on January 14, 2004, 02:37:24 PM
Ok boss I'm not sure what is happenning so here is a real script version of what I said, I Tested it and it works fine the problem might be something to do with your npc reaction to being talked to?


(if(Said('talk/man'))
 (if(send gEgo:has (INV_FISH))
 Print("leave me the hell alone i've given you my fish!"))
  (else
  (send gEgo:get(INV_FISH))
  Print("here have a fish!")
  )
 )

Title: Re:Props help needed
Post by: Lancelot on January 14, 2004, 11:20:43 PM
Ok I used your script.I just changes the fish to fruit and it still gives me the message.What do you mean with the npc reaction to being talked to?I used him to just talk to Ego and it work.He was set up just like in the tutorial exept that I used a different view.
In the main script where I set up the inventory items what must the owner be set to.
Title: Re:Props help needed
Post by: Cloudee1 on January 15, 2004, 01:35:06 AM
I have never changed the value of any of my inventory items' owner.

Therefore I am going to say 0
Title: Re:Props help needed
Post by: Lancelot on January 15, 2004, 08:11:25 AM
My owner is set to 0 but I still get I get an Sci message saying.That what I did they didn't think off and that I should take a different approuch.
Title: Re:Props help needed
Post by: Lancelot on January 15, 2004, 08:12:48 AM
My owner is set to 0 but I still get I get an Sci message saying.That what I did they didn't think off and that I should take a different approuch.

Is there anything I have to put in the main script that don't stand in the tutorial.
Title: Re:Props help needed
Post by: Lancelot on January 15, 2004, 12:07:50 PM
Help anybody who know what the problem is.
Title: Re:Props help needed
Post by: Eigen on January 15, 2004, 01:40:22 PM
It's probably because you havent defined the inv. object in Scripts > Header > game. There should already be:
(define INV_NOTHING           0)
Then add:
(define INV_FRUIT               1) //Or the number, which it is in the list in the main script. ...{Fruit} ...etc

This should do the trick...


-Eigen
Title: Re:Props help needed
Post by: Lancelot on January 15, 2004, 10:42:00 PM
I already did it but I'll check it out again
Title: Re:Props help needed
Post by: Lancelot on January 15, 2004, 11:25:20 PM
I checked it out and I did define it as fruit.
That isn't the problem.
Title: Re:Props help needed
Post by: Cloudee1 on January 16, 2004, 05:26:58 AM
Post your code  ;)
Title: Re:Props help needed
Post by: Lancelot on January 16, 2004, 07:26:45 AM
I found that problem it was in another script.
It works now but after I talked to him I can't see the fruit in my inventory.Although it prints the apropriate message everytime I talk to him. :)
Title: Re:Props help needed
Post by: Lancelot on January 16, 2004, 01:13:40 PM
Don't worry the problem was that my brackets weren't all in the right place so he didn't show the fruit in my inventory.