Hi ORK Community,

I have looked all over for a way to do this, and read everything I could find. Nothing I have tried yet has worked. So here's the scenario:

I have skills defined that need to result in a number that I can call and use for things like a formula to determine movement speed (that I then pass on to a controller script), or how much damage your unarmed strike does.
These skills are separated into three parts: a status value, a formula (passed on to the status value), and a game variable (to store a float to be passed on to the formula). I currently have each skill's game variable added on the player combatant's Object Variable Settings with a given value. So for the 'Acrobatics' skill I have a game variable on the combatant that has its value at 5. In the formula for Acrobatics it should do this:

Acrobatics [variable value] + user's Dex_bonus = formula result
OR
5 + -5 = 0

However the value for Acrobatics only returns 0, so the formula only returns -5. I'm currently using a Value node set to 'Add>Game Variable>Acrobatics>Object>User' thinking that would return the value stored on the player combatant, but it returns a 0.

I'm wondering how I can get the value that I stored on the player combatant and use it in the formula. Or am I going about this the wrong way and I should derive my player skills differently to have them result in a number I can use elsewhere?

Thank you guys in advance for your suggestions.
Post edited by dragoonleaph on
  • The setup sounds correct - is this not working while playing the game or when you test the formula in the editor?

    Since object variables are bound to game objects, they're not available during testing in the editor (since the player isn't spawned).
    If it's also not working in-game, make sure you've either set up the object variables in the combatant's settings or added an object variables component to the combatant's prefab.
    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!
  • Gil,

    Thank you so much. I works just fine when I run the game. Now I can keep going with systems creation!
Sign In or Register to comment.