To pick something up |
Lets pickup our object and add it to the inventory... no matter what your object is. Create an Item and give it the same as the object. You can also use the same image, it will be automaticly resized.
Now add to the objects script :
on
(take) { pickup (self) setobj (YourObject ; 0) additem (self ; YourItem) } |
The scriptcommand pickup will make a character perform his pickup-animation. Setobj used with a zero disables an object and makes it invisible. Additem
will add the item to the characters inventory.