Hi,

I am thinking of allowing the possibility to interact with the world.
I want to allow the player to use a computer console in the game and lets say hack it based on a ability, or status value.

I was thinking of using abilities for this but not sure how to check what the state of level of an ability is. I looked at this tutorial: http://orkframework.com/gameplay/2015/02/23/harvesting-items/ and I think I understand how I can create an interaction with the world between to the player and a world object and using events to do something but I am not sure how to check if the player ability is high enough to "hack" the computer console. I was thinking of also allowing the ability to level up by uses.

Also I have another question. Is it possible and how would I start to implement a leveling system where I could also decrease status values or ability level based on some logic. Lets say that I want to use one ability in the world to interact but by using this ability another ability might lose or will lose points from that ability. Is something like this possible with OTB ORK Framework functionalities or will I have to create my own events or other functionality? And do you have any tips how would I proceed?

Thank you in advance.
  • just do a check on that status value an if say status value is equal or greater than 20 or what ever you want then on the success do a call menu screen with all the functionality you wanted in it. might need multiple screen for this
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • You can check abilities/status values (and other things) in event steps, so checking your hacking ability level (or status value) to determine if the player can hack a computer is possible. E.g. using a Check Status or Status Fork step.

    To decrease status values or remove ability levels, you'd need to implement this using the event system. E.g. when using ability A should decrease ability B, you'd do this in A's battle events.
    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!
  • OK, great, thanks for the tips and info. I'll try these tips and see what I can come up with, nice :).
  • Hi,

    I have one question related to this. I found a way to check a game variable of a game object that the player interacts against a formula return value(I think, I'm still working on this :) ). This is in an event.

    I am wondering is it possible to pass to a formula a game variable value? I can assign manually a value but if the object stores the needed value for the formula to do something with it, it would be great if I could just take the value and pass in to a formula in a event step.
  • You can't directly pass the value to the formula, but since formulas also have access to global (and object) game variables, you can just store it e.g. in a global variable and use that variable in your formula.
    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!
  • Aaah, OK, good to know, thank you again.
  • Hi,

    Me again :).

    I'm working with formulas at the moment and have this weird thing.

    I just a have formula that outputs in my opinion a value over 200. Then I have an event which check at some point that the formula value(I suppose the return value) is greater than the object game variable.

    This does not seem to work, After playing around a little bit I noticed that when I change the condition to IsEqual to zero then the condition succeeds. This is telling me that the formula is returning Zero. I just do not understand why.

    What have I done wrong perhaps? Check the images.

    image
    image
    image
  • Ouh and when I press the Calculate button in the formula to test it I get a value that is what I put in the formula which is a value over 200.
  • Formulas only work if user and target are combatants - i.e. if your event object isn't a combatant, it wont be calculated and returns 0.

    Also, if the screens are your correct settings, your HackingReq object variable is 0.
    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!
  • Ok, Thank you for the information regarding the formula workings.

    Yes you are correct the variable was set intentionally to zero to test the formula againts zero return, this was intentional on my part.

    But OK this explains the behavior I was experiencing. Thank you for the information.

    I'll just have to adapt :).
  • If the formula isn't using something from the event object (your target), you can just use the player as user and target for the formula. Otherwise, you can set up a neutral faction (not being enemies with any other faction) and use an Add Combatant component to add a combatant to your event object.
    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!
  • OK, cool :). Nice tip, I'll try which works best. Excelent :). Helps with the ideas I have on skills development and calculating how the skills of the player affect if or not a player can do something in the game world like hacking a computer console or similar.
  • Woohoo :), worked like a charm :). The second option I think is the best. This actually is much better than a simple "static" world object to which the user interacts with.

    This approach actually allows me to create "neutral" lets robots or similar which is the player tries to "hack"(like in these examples) might turn against the player etc. Much more complex world interaction this way. Many possibilities.

    Cool, thx. Great tip again.
  • Hi,

    This time scripting question regarding Abilities :).

    If I want to get the max level learned by the player character what approach should I take:

    Combatant c = this.origin.GetCombatant(user, target);
    c.Abilities.Get(0).GetActiveLevel()
    The above? But I am thinking that you can also set the active level with the SetActiveLevel function. This basically means just the active level of the ability that the user is using at the moment? Right? Not the max learned level?
    combatant.Abilities.HasLearned(this.selectionID, this.level)
    Am I restricted to something like above where I have to go through a ability a level by level and see if the true or false is returned? I was not able to find a function that said "return max learned level of this combatant", well I am not sure. Some functions indicate this but not sure which one is the correct one.

    And if I want to get the levels of an ability I should use this, where the last position in the array is the highest level?:
    ORK.Abilities.Get(0).level
  • First of all, this code will get you the AbilityShortcut class representing the ability of the combatant:

    AbilityShortcut ability = combatant.Abilities.Get(int index);

    If the ability for the index wasn't found, this will return null, so you should check that before accessing it (if(ability != null)).

    The level learned by the player can be accessed like this:

    int maxLevel = ability.Level;

    The current use level will be returned when using this:

    int useLevel = ability.GetLevel();

    The GetLevel function will return the level-1, i.e. level 1 is 0, lvl 2 is 1, etc.

    To get the maximum level an abilit can have:

    int maxPossibleLevel = ability.Settings.level.Length;

    or

    int maxPossibleLevel = ORK.Abilities.Get(int index).level.Length;
    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.