I've got some trouble picking up items in FPS. I've got a FULLY working inventory system. Only I can't call the Loot() function:
I now got this. But this isn't working. I want to get close to the object, Press E and then call the Loot() function.
Alright, I'll break it all down and hopefully we can get it to work. Try creating a new variable to hold your fully working inventory system's script (obviously change the names of variables to whatever you prefer and make sure your GetComponent references your script's actual name - it's probably not called FullyWorkingInventorySystemScript, as that's a silly name).
Then call your function like this;
Drag whatever object you've attached your script to onto that exposed variable, and test to see if it now works. Fix any minor errors that the debug log might throw back at you (eg. spelling errors and missing semicolons). Once you've done that and tested it, post back here to say if it's working or not. If not, then we'll try something else.
answered Feb 07 '12 at 04:33 PM