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.
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
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
Also, if the screens are your correct settings, your HackingReq object variable is 0.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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 you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
This time scripting question regarding Abilities :).
If I want to get the max level learned by the player character what approach should I take: 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? 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?:
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;
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!