Hi guys! I'm a newbie to BO3 mod tool and I haven't touch Radiant or GSC before. I have some experiences with C#(unity), LUA (LOVE2D) scripting. But when I'm trying to learn GSC in BO3, I'm kinda blocked and confused. I watched many scripting tutorials on YouTube from JBird, Uptown and many other awesome YouTubers. But most of those tutorials were using a pre-made prefab/scripts to achieve things. They didn't explain how each line work and why. Thus it's really hard for me to guess all the APIs and how to use them. Is there any doc, wiki or tutorial series teaching people how to do GSC from 0 to 1? Like write the first "hello-world" script then later use a trigger to start a lock-down zombie event?
I'm trying to do the similar event from Shaow of Evil: after the player using a trigger, all doors lock and spawn ghost wizards. After the player kills all wizards, all doors unlock. Right now I can think the logic of this event, but I don't know how to use GSC and Radiant to implement my logic. I don't know how to use triggers to spawn enemies. Or how to add those wizards into my level. So if you guys can help me out, you are much appreciated.
Anyway, BO3 Mod tools with GSC looks really powerful. To me it looks like a simplified unity, if there is a complete scripting tool, I'm pretty sure it will be really helpful!
In your black ops 3 root folder, look for a folder named 'docs_modtools'. In there, read the GSC_language file. You'll see other docs in there that will help with the basics. Now as far as the api goes, all the functions (or most of) are defined with examples in the bo3_scriptapifunctions pdf in that same folder. If you already have coding experience, in my opinion this won't be that difficult for you. If I were you I would set up sublime with the syntax highlighting package - included in the docs_modtools folder. Once you have that set up, in sublime hit view > syntax > GSC on any scripts you're working on. This will help get you started - https://confluence.ugx-mods.com/display/UGXMODS/Black+Ops+3+Modtools.
You can find existing scripts in root>raw>share>scripts to read and learn from. This is mostly how I learned gsc between reading ugx communnity scripts, and the ones included in the game. Also, feel free to use the help forums for any specific topics you're having issues with. When I started out, one of my brothers was starting out at the same time, so we sort of had this back and forth collab where we shared problems and solutions in scripting and helped each other learn where the other succeeded. It definitely helps to have someone to work with if that's an option for you. Anyways, hope this info helps, I don't mind answering any questions you have, If I don't know the answer I'm sure someone else will, and if all else fails just use the help forums and usually someone will reply within a day or so.
Last Edit: May 07, 2017, 06:01:50 pm by Archaicvirus
Thank you very much! I will follow your advice and read those docs!! This is really helpful!
And is there any doc or tutorial teaching how to interact a game object with functions? Like if I have a spawner and a trigger multiple in the game, how can I connect these two with a function? So I use the trigger, then the game calls the function, and the function makes the spawner spawn a zombie. Are there any examples like this?
Meanwhile, is there any way I can read some scripts from the map Shadow of Evil? It looks like this map has the most complicated mechanics in all zombie modes. It's also possible this map is hard coded, but I really wish it's not...
Anyway, thank you for the good advice!! I will try to discover more things and share with the community! You guys are awesome!!!
and is there any doc or tutorial teaching how to interact a game object with functions? Like if I have a spawner and a trigger multiple in the game, how can I connect these two with a function? So I use the trigger, then the game calls the function, and the function makes the spawner spawn a zombie. Are there any examples like this?
In radiant, objects you want to be available to script need to be entities, which include triggers, player volumes, script_model, script_brushmodel, script_origin, script_struct and some others. You can acquire them as a variable in script a few different ways. It depends on what you're doing. For triggers though, first how are you activating the trigger? This needs to be set up in the trigger's kvp's. So if you want the trigger to activate when a player enters the area (inside the trigger), then trigger_multiple is already set up by default to only trigger on players, I believe. Check the kvp's on a new trigger_multiple to verify that. The kvp's you're looking for are at the top of the list.
Anyways you can easily find a trigger in a script by giving the trig a kvp script_noteworthy: some_variable, or targetname: some_name. Other kvp's work too you just have to experiment.
Last Edit: May 12, 2017, 11:57:14 pm by Archaicvirus