Hello everyone,
being new to programming, I turned to Ork(3) for my project. Ork seems to satisfy most of the needs of my project but certain aspects must still be managed by another Framework (assets). I try to create bridges between these different Assets but in a very simple way (Without Wrapper) because of my very limited programming skills.
However, since I used Chat GPT, things are much simpler and I can create scripts that meet some of my specific needs (quite simple thing). On the other hand, ChatGPT's knowledge of Ork Framrwork (3) remains quite limited and does not allow it to be used properly.
I would therefore like, if possible, for you to make 3 complete scripts available here, so that I can understand the logic and share it with chat GPt, aspects to take into account in order to possibly progress in this aspect. The scripts will also help me understand (probably with the help of GPT) how the ORK/MAKINOM API was used.
Here are the scripts I think I'll need to get started:
1st script: A script having a Method (which can therefore be called theoretically from anywhere), method which will trigger a machine (auto machine, machine interaction...??) And launch the schematics linked to it ,with as Starting Object, the object which launched the method and as machine object, the object on which the machine is.
2nd Script: A script with a Method (which can therefore be called theoretically from anywhere) which if called will create a selected data Global and add a list of objects (defined by their ID?) present in the inventory of the player (or any actor).
3 end Script : A script with a Method (which can therefore be called theoretically from anywhere) which will modify the variables present on a GameObject which has the "Variable Object" component.
The way in which the objects to interact are selectable is not important (search for object, objects to place in the Inspector etc., because this is easily modifiable with GPt).
These scripts will not be useful in themselves, but will just allow me to start studying scripting related to Ork and Makinom and to share it with GPT.
I insist on the fact that they must be complete and not just extracts (possible to add comments to make the task simpler in GPT).
I thank you in advance.
@gil I have the impression that GPT (web Browing) is having trouble accessing the site containing the ork/manikom API.
1) You can start any machine component via it's StartMachine function:
machine.StartMachine(startingObject, startVariables);
startingObject is the game object of the starting object (can also be null), startVariables is a VariableHandler with variables to pass on, but can usually just remain null.
2) You can add things to global selected data like this:
Maki.Game.SelectedData.Change("key", yourData, ListChangeType.Add);
Replace key with the data key you want to change, yourData is simply whatever you want to add (either a single thing or a list of things).
3) You can use this helper to get variables from whatever you pass on to it (if it has something):
VariableHandler handler = ComponentHelper.ToVariableHandler(thing);
E.g. thing can be a GameObject, a combatant, an ability, etc.
The variable handler has functions to change, check and get variables.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!