edited March 2014 in ORK Support
Hey, GiL (again XD)
Thanks for your advice on object variables. I'm now able to cut a tree and have a log appear in my inventory. I also created a global event where if I press C, it will check to see if my inventory have a log, and if it do, to remove one log from my inventory and spawn a campfire near me. Works perfectly.

But this part, I can't seem to solve it for the life of me. I want to stand near the campfire, go into my inventory, click on a log, have a USE button appearing, click on the use button, making one log disappear from my inventory and spawning a torch in my hand.
I only want the use button to be clickable if I'm near the campfire.
I tried creating a recipe "Torch" with an ingredient of one log. But the rest, I don't know how it should be implement. How do you think the general implementation should be?
Post edited by Shadow_Fire on
  • Currently not really possible ... but I can add use conditions to items (and abilities) to enable this.

    E.g. allow using the log only if a variable 'campfire' is set - and it's set when the player is within a trigger around the campfire :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That would be much needed and much appreciated!
    Thanks, GiL! I'm look forward to it :)
  • edited January 2014
    Hey GiL! Thanks for implementing this. Please forgive my shamefulness for saying this XD, do you think you can give me a push in the right direction? I'll handle the rest, just need a nudge.
    I tried doing it for a while, but can't seem to make it work.

    I create an event and put it to my campfire prefab and make the start type TRIGGER ENTER(As a test,I did my event so that when I'm inside the trigger, a dialogue pops out to assure me that the trigger is successful).
    In Inventory/items/log on the Game Variable section I than create a variable campfire of type bool with the isValid box uncheck.
    That's as far as I got figure out. I tried to wrap my head around the whole thing trying to make it work, but I couldn't come up with a solution. Do you got one?
    Post edited by Shadow_Fire on
  • Well, you need two events (on the same object with the trigger).

    The first event will set campfire to true on Trigger Enter. The 2nd event will set camprife to false on Trigger Exit.

    Now, the item needs a condition, checking for campfire to be valid (so, Is Valid needs to be checked).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2014
    Ah, that was what I was missing! I never knew you could put two events on the same object.
    The variable campfire is now trigger accordingly. On enter, it's set to true, and on exit, it's set back to false.
    I did a quick test to make sure it was set correctly: I made a global event that will call upon a dialogue whenever I press an input key, but only if the variable condition campfiretype bool is true. Works like a charm. I can only call upon the dialogue when I'm near the campfire.

    This last question, than I won't bother you for a while XD. I set up the variable requirement in Items/Log. It's set to campfire bool isValid checked. I still can't click on the log when I'm near the campfire. (In inventory menu, the log is still unclickable.) What step did I miss? I know it's not something to do with setting the variable incorrectly, so it's something to do with the item.
    Post edited by Shadow_Fire on
  • Well, the menu doesn't automatically update - if you had the menu open before entering the trigger, it'll show the old state.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.