Is there a way to set traits for a certain type or tagged prefab in the entire scene?

For example, I spawn an apple, or the scene already has the apple in it or I place a prefab with the apple in it and that apple has certain traits like price, weight, etc? And I set this for all the apples, oranges, long swords etc?

Normal I would put a script on the apple prefab and then every time it brought it up the script would be there. I could still do that I guess, but I was wondering if ORK has a built in way of doing this.

Thanks


  • Set up your apple as an item in ORK's Inventory tab, and assign your apple prefab to it in its Item Prefab field. Set all your traits for it here.

    Then place an Item Collector object in your scene and set it to Type: Item and Selection: #: Apple. When the Item Collector is set to Start Type: Interact, you can pick it up by interacting with it normally (clicking on it, pressing Enter when near, etc).

    So any items that you want to be treated as more than just background scenery should be created within ORK's Inventory system. You may also want to create a Scene Object for each type of item so that you can customize your tooltips and/or interaction HUDs (and mouse pointer too). Use an Item Collector object to spawn the prefab in the world (or an Item Collector set up as an Item Box as a container to hold such items). When set up this way, if a player character or an NPC drops an item in the world, the item prefab will be spawned on the ground and the attached ItemCollector will allow the player to pick it up.
  • That makes sense, thanks
  • No problem! Glad to be of help.
Sign In or Register to comment.