Is there a way around the standard Ork Main Menu?
I would like to have my New Game, Continue (or Load) and Option buttons across the bottom of the screen about an inch or a little less from the bottom of the screen.
If there's no way to do it with Ork, does anyone know a way that can be used and still connect to Ork perfectly? I'm not much of a scripter, and this would really save my title screen!
Thanks
If you only want to display the buttons somewhere else (or horizontally instead of vertically), that's easily done by changing the GUI Box you're using for the main menu.
The position can be changed in the Content Box Settings of the GUI box (bounds and anchor), and you can display the buttons horizontally if you increase the Choice Columns and set Column Fill to Horizontal in the Choice Settings.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
I'm having a small issue with having 4 buttons horizontal. The last button is cut in half and it seems like no matter what I change it won't fix it unless I switch to a lower resolution with shirnks the buttons and make them a but awkward looking. Any idea what could be going wrong or is this really only designed for 3 buttons to work horizonally?
I have the box bound to:
x - 550
y - 850
W - 1000 (I was messing around thinking I needed to make it appear wider to fix the last button)
h - 150
Anchor is set to Lower Center and padding is all 0.
I'm using my own graphic so the show box tab is not selected.
Thanks
No, you can't change the icon graphic when it's selected, but you can display a different portrait for each button.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For example: I create a new choice in the ORK editor main menu tab. Named it "Continue" and added a new script to the "ORK Game Starter" object. Created a function called "ContinueGame" in there and now I need to know how to load the game saved in the first slot.
Let's look up: Gamehandler -> LoadGame and we find:
void ORKFramework.GameHandler.LoadGame ( DataObject data )
Used to load the data - you need to get the data from the ORKFramework.DataObject.
Parameters
data A ORKFramework.DataObject containing the data.
Implements ORKFramework.ISaveData.
So look up ORKFramework.DataObject:
DataObject ORKFramework.DataObject.GetFile ( string key )
Gets the ORKFramework.DataObject assigned to a key.
Returns
The ORKFramework.DataObject if the key is found. Returns null if the key isn't found.
Parameters
key The key to look for.
What is the value of the key?? "File 1"??
So let's try that: Let's add "ORK.Game.LoadGame(ORKFramework.DataObject. "
at that point the autocomplete should show "GetFile" but it doesn't?! Can I just ignore that and contine until I have: "ORK.Game.LoadGame(ORKFramework.DataObject.GetFile("File 1")); "
Well, that gives an error. Not really surprising but now I am stuck because the API is a horrible place to find something.
Another example: CombatantEquipment.Equip:
bool Equip (int partID, EquipShortcut equip, Inventory inventory, bool reset)
How do I get the partID? Did you know that setting partID to "-1" automatically puts the item at the first location it can be equipped at? GIL told me that because it is NOT written down anywhere in the API or the tutorials!
"EquipShortcut equip" is no problem but "Inventory" has to do with the way the Equipment System works in ORK and what does "reset" do? Again there is no information given in the API! Even looking it up in the sourcecode didn't help me understand what "reset" is supposed to do.
It is really tiresome to constantly get stuck because there is no documentation about what a function or its arguments does.
Well, if you'd have taken a look at the scripting how-tos, you'd know the basics of where to find what in the framework - e.g. save games (and loading them) is handled by the SaveGameHandler class, accessible through ORK.SaveGame - to load a save game, you call:
ORK.SaveGame.Load(int index);
I know, the API is still somewhat missing details and descriptions, but don't forget that this is a massive framework with over 2 years development time that you got for pretty much nothing in costs. Managing all of this alone is quite time consuming, so some tasks stay behind, e.g. the API which isn't used by many people, because most don't do scripting.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
public void ContinueGame() {
ORK.SaveGame.Load(2);
}
Clicking on the "Continue" button does nothing. No error or warning. File 1 and File 3 are used and File 2 is empty but the index starts at 0. So what is wrong? I've added a "Debug.Log" to "ContinueGame()" and it is not printed ergo the function is never called.
BTW: I incorrectly remembered that "ORK.GameHandler" governs "Saving" and "Loading", that is why I didn't check the "How To" website again.
"the API which isn't used by many people, because most don't do scripting. " Can't wait for the day when I am finished with scripting. With the speed I programm that will not be any time soon. :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
public void ContinueGame() {
Debug.Log ("Function ContinueGame Entered");
ORK.SaveGame.Load(indexLastSave);
}
"indexLastSave" is calculated with "File.Exists" from "System.IO" I think, so I know that the file does exist.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The only way I got a warning was when the component name was correct but the function call name was not. Wrong component name doesn't throw a warning which seems weird.