I'm in heavy development of my game, so I thought I wouldn't clutter the forums with so many questions. I hope this is better for you GIL.

1- How do you use formulas for durability of equipment instead of values? No matter what I tried, every time I go from a fixed value to a formula, it always returns 0.

2- Same thing with game variables attached to equipment. Doesn't work no matter what.
  • 1) I'll need details on your formula and durability setup.

    2) What exactly doesn't work? How are you trying to access or change them?
  • edited September 15
    OK I figured it out.

    I was trying to use a formula on the durability field of equipment and also on their game variables. I put an initial value in the box, and the initial value was never being used no matter what I did, so I thought the whole thing was broken.

    Then I realized in the first node of the formula, you have to check "current value" as a starting value for it to take the initial value into account.
    Post edited by UserName on
  • Well, no, you'd just have to change the Start Value operator to Add instead of Set to not override the initial value passed on to the formula. I'll change that in the next update to have add instead of set as the default for new formulas :)
  • Thanks GIL that will be helpful.

    On a related subject, I need to use "target equipment's current durability" and "target equipment maximum durability" in a formula, to do different things based on them. But I found no way to do that, unless I'm missing something?

    So I thought I would add a game variable to the equipment, select it, store the equipment durability into the game variable, then do operations on it instead. But I found no way to store an equipment durability into a variable, looked at all the nodes in battle events. Any ideas?
  • I don't think there are currently nodes for that - will look into it :)
  • Thanks GIL
  • There'll be a new formula node to use the durability of an equipment (stored in selected data) to change the formula value in the next update :)
  • You're the best GIL :D
  • edited September 20
    Hi GIL, I ran into a little problem.

    I have many very similar big battle events, with identical nodes except for small differences. So I thought I would just copy the events.asset, open them with notepad, find and replace all text I want to change, since they are just texts and should not cause any problems.

    But when I do, Ork doesn't recognize the event anymore, and I cant open it, and every call nodes to that event I edited with Note Pad are set to none, so it doesn't work. I had to delete it and restore my backup.

    So how would you approach this problem?

    Post edited by UserName on
  • Well, I would not use anything other than the event editor to change events :)

    While you can edit them using text editors, it's risky to cause an error due to wrong changes, or the editor just changing the formatting somehow, so that Unity is no longer recognizing the file correctly.
  • Yeah seems to be the smart thing to do, I'll stick with the editor, thanks GIL
Sign In or Register to comment.