Author Topic: Props help needed  (Read 4258 times)

0 Members and 1 Guest are viewing this topic.

Offline Lancelot

Props help needed
« 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.



Offline Cloudee1

Re:Props help needed
« Reply #1 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

Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Lancelot

Re:Props help needed
« Reply #2 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.

Offline Cloudee1

Re:Props help needed
« Reply #3 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!")
  )
 )

Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Lancelot

Re:Props help needed
« Reply #4 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.

Offline Cloudee1

Re:Props help needed
« Reply #5 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
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Lancelot

Re:Props help needed
« Reply #6 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.

Offline Lancelot

Re:Props help needed
« Reply #7 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.

Offline Lancelot

Re:Props help needed
« Reply #8 on: January 15, 2004, 12:07:50 PM »
Help anybody who know what the problem is.

Offline Eigen

Re:Props help needed
« Reply #9 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
« Last Edit: January 15, 2004, 01:42:18 PM by Eigen »
Artificial Intelligence Competition

Offline Lancelot

Re:Props help needed
« Reply #10 on: January 15, 2004, 10:42:00 PM »
I already did it but I'll check it out again

Offline Lancelot

Re:Props help needed
« Reply #11 on: January 15, 2004, 11:25:20 PM »
I checked it out and I did define it as fruit.
That isn't the problem.

Offline Cloudee1

Re:Props help needed
« Reply #12 on: January 16, 2004, 05:26:58 AM »
Post your code  ;)
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Lancelot

Re:Props help needed
« Reply #13 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. :)

Offline Lancelot

Re:Props help needed
« Reply #14 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.


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

Page created in 0.031 seconds with 20 queries.