Right now, my biggest issue with ORK is using variables. I understand they are not exclusive to the framework, it's just a topic I've never really understood entirely.
I know what they are used for, but some aspects of it are just blank to me.
I know that a bool variable stores true and false, but that's about all I know regarding booleans. However, variables such as string and float, I don't really know. If anybody could take the time to explain to me just how they work, I would be entirely grateful.
In ORK, I see alot of things like Value Type, Value, String Value. There's lots of stuff going on here and they just go over my head!
String - A string variable is a 'string' of alphanumeric characters and allowed symbols. For example, "Hello world, I'm 102 years old today!" is an example of a string. Strings are basically used for storing text.
Let's say I make a Global Variable called 'CurrentStateOfPlayer.'
Unlike a Boolean, where I can only have true or false, with a string I can put down any kind of value.
I'd recommend taking a look at some basic coding tutorials to better understand the basics of variables. You don't need to know how to script at all (I sure suck at it), but knowing the basic concepts of coding is essential.
Have you checked the game variable how-to? There's some information on the different things :)
Generally, you can set the following things: - text (string) - trigger (bool - true/false) - number (float - e.g. 5.3) - position (Vector3)
The different Value Type selections let you decide where the value you're using comes from. You'll mostly use the Value setting, which let's you define the value directly in the settings. But you can also use a value stored in a different game variable or other things (like the scene name, or a stored position).
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!
At this point, I'm rather stuck. I couldn't find where or what I can do with Bob, it's just a name after all! There are two places to put Bob, and I haven't the slightest clue why.
First of all, you don't need to add your variables in Editor > Game Variables before you can use them. That's only used to add stuff to the variable list used by the variable fields. You can define new variables by just typing their name in the value field from Variable Key.
Anyway - your Bob is the key (or name) of the variable. You'll use it in the Variable Key part of setting/checking variables. The actual value of the variable is set/checked in the Value part (in your case, in the String Value part). So, whatever you want to do with Bob, you set it up in the Value part of the settings :) Also, each variable key (Bob) can hold one value of each type, so you can store a text, a number and a position at the same time into it.
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!
Well, one use would be implementing quests - an example of using a string variable for storing the status of a quest can be found in this game tutorial.
Another example is using a float variable as a counter to let an NPC tell you something different each time you talk with him - can be found in this game tutorial.
Generally, you can do a lot of different things - from simple gameplay elements (like the above examples, storing state of stuff) to creating complex systems within ORK Framework (like a calendar/hour system and having NPCs do different things depending on the day/hour).
I'll do some tutorials on this stuff after the game tutorials are finished :)
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!
It's the same with equipment viewers as it's with everything else - if the variable condition is valid, it will be displayed :)
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!
Usually, yes - it really depends on what you want to do. E.g. when you want a special weapon displayed during an ability, simply set the variable in the event (and remove it at the end). Here you'll find Object game variables useful - they work like the usual (global) game variables, but are bound to a game object. This way you can use the same variable for different combatants, without having the ability playing on one trigger the equipment on others :)
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!
So let's say a character's main base attack weapon is a sword, but has an ability that uses a hammer. I would have to use a variable to temporarily turn off the Equipment Viewer for the sword, while spawning the hammer prefab (using Equipment Viewer) with another variable. This would have to be done in the Event for the ability for whenever I use it, right?
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!
Let's say I make a Global Variable called 'CurrentStateOfPlayer.'
Unlike a Boolean, where I can only have true or false, with a string I can put down any kind of value.
Variable: CurrentStateOfPlayer String Value: Dead
Variable: CurrentStateOfPlayer String Value: Alive
Variable: CurrentStateOfPlayer String Value: Juggling
I'd recommend taking a look at some basic coding tutorials to better understand the basics of variables. You don't need to know how to script at all (I sure suck at it), but knowing the basic concepts of coding is essential.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
There's some information on the different things :)
Generally, you can set the following things:
- text (string)
- trigger (bool - true/false)
- number (float - e.g. 5.3)
- position (Vector3)
The different Value Type selections let you decide where the value you're using comes from. You'll mostly use the Value setting, which let's you define the value directly in the settings.
But you can also use a value stored in a different game variable or other things (like the scene name, or a stored position).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
In Editor>Game Variables, I added a variable named Bob. That's about all I was able to do in there.
When I go into Events and use the Check Game Variable step, I see that I can add Bob into the Value (string).
http://imgur.com/m5rovJS
At this point, I'm rather stuck. I couldn't find where or what I can do with Bob, it's just a name after all! There are two places to put Bob, and I haven't the slightest clue why.
You can define new variables by just typing their name in the value field from Variable Key.
Anyway - your Bob is the key (or name) of the variable. You'll use it in the Variable Key part of setting/checking variables.
The actual value of the variable is set/checked in the Value part (in your case, in the String Value part). So, whatever you want to do with Bob, you set it up in the Value part of the settings :)
Also, each variable key (Bob) can hold one value of each type, so you can store a text, a number and a position at the same time into it.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Another example is using a float variable as a counter to let an NPC tell you something different each time you talk with him - can be found in this game tutorial.
Generally, you can do a lot of different things - from simple gameplay elements (like the above examples, storing state of stuff) to creating complex systems within ORK Framework (like a calendar/hour system and having NPCs do different things depending on the day/hour).
I'll do some tutorials on this stuff after the game tutorials are finished :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I suppose all I need now is a tutorial or how-to on variables with Equipment Viewers!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
E.g. when you want a special weapon displayed during an ability, simply set the variable in the event (and remove it at the end).
Here you'll find Object game variables useful - they work like the usual (global) game variables, but are bound to a game object. This way you can use the same variable for different combatants, without having the ability playing on one trigger the equipment on others :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
So let's say a character's main base attack weapon is a sword, but has an ability that uses a hammer. I would have to use a variable to temporarily turn off the Equipment Viewer for the sword, while spawning the hammer prefab (using Equipment Viewer) with another variable. This would have to be done in the Event for the ability for whenever I use it, right?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!