Author Topic: Inventory system  (Read 1254 times)

sicga123

  • Guest
Inventory system
« on: October 15, 2013, 02:27:23 PM »
Hi
I am trying to get the drag and drop scripts to work in a game I'm making. From the example given of the inventory scripts obviously the 3D and 2D cameras require the UICamera script for the dran and drop to work. My game uses the FPPOV and the player camera moves. When I put the UICamera script on this camera it will interact with the geometry but will no longer collect pickups i.e. will not interact with small items as it was doing before the UICamera script was put on the camera. I was wondering whether this problem had been encountered before and if so whether there is a known solution?

Any help would be greatly appreciated.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Inventory system
« Reply #1 on: October 15, 2013, 02:36:02 PM »
What small items? UICamera script on a camera simply means that the objects that camera sees will be capable of receiving events.

sicga123

  • Guest
Re: Inventory system
« Reply #2 on: October 15, 2013, 10:51:52 PM »
Well basically objects that have unityscript scripts on them no longer react to a MouseDown function. However, I tested a small C# script and this did work, so there seems to be some disconnect between the unityscript scripts and the UICamera script by this I mean without the UICamera script objects in the maincamera will react accordingly with unityscript script but with the UICamera script on the maincamera theses objects no longer recognise a mouseDown event. Any idea what could cause this and is there someway around it? Although it would be a good idea to change all these scripts to C# I'm not very experienced with C# and usually have a fair few problems making things work, not to mention that there are over 1000 objects with various unityscript scripts on them and although there are only 3 different scripts there is some work to link them all up again once the changes are made. Is there any instruction that can be added to the Unityscript or the UICamera that would force either to react to the other to avoid having to do this?
« Last Edit: October 15, 2013, 11:33:32 PM by sicga123 »