Call of Duty: Black Ops III

Call of Duty: Black Ops III

Not enough ratings
[Scripting] Print Functions
By Mysti and 1 collaborators
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hey everyone, this guide is more of a basics of scripting I might pick up to teach people the building blocks of GSC so you can make your own scripts without having to worry about copying and pasting or bothering experinced people. You may be thinking something along the lines of "hurr I'm to dumb to program" and I can tell you now that's where you're wrong. You're computer is the dumb one, after you're going to be the one telling it what to do. So let's go!
IPrintLn(string)
So, IPrintLn(string) What the hell does this do? Well it prints whatever you want onto the screen, although you do need a bit of other code to get it to work. Something like this will do

function MyPrint(Message) { foreach(Player in GetPlayers()) { Player IPrintLn(Message) } }

Now, if you called "MyPrint("Hello");" fom somewhere in your Code, the Message variable would be filled with "Hello" and then that would be passed to IPrintLn to be displayed, it looks something like this in-game:

Now that's not right, anyone could miss that! But before we move on, you can do a fair bit with all these Game Functions, you can concatenate strings! So you could go something like this!

function MyPrint(Message) { foreach(Player in GetPlayers()) { Player IPrintLn(Message + Player GetPlayerName()); } }

That will print whatever your message is then the players name right after, take note there won't be a space, to add a space we do this

function MyPrint(Message) { foreach(Player in GetPlayers()) { Player IPrintLn(Message + " " + Player GetPlayerName()); } }

See we added empty quotes with a space, yep. That's that! So now let's move on!
IPrintLnBold(string)
So, IPrintLnBold(string) it's almost the same as IPrintLn, but not quite, we'll see a subtle difference, but otherwise everything else is the same which makes life easier.

function MyPrint(Message) { foreach(Player in GetPlayers()) { Player IPrintLnBold(Message) } }

this code looks like this in-game:
That's better! We can easily see that, top middle of our screen, how can we miss it? You can do the exact same with this as you did with the other function, so we'll leave this here as I don't see the need to say the information agian.

That's that! So now let's move on! See how easy scripting is?
Announcement(string,int)
Well here we are, at the last section of this tutorial, these are the print functions I mostly use the game probably has more that I haven't documentated but another tutorial maybe?

Anyway, this tutorial is the same as the other 2 here, but there is something special about it, you just call it like this

function MyMessage(Message) { Announcement("Hello!", 5); }

Now, why aren't we saying what player? Well, because it sends it to everyone. The only catch it, it's not that great sadly. It looks exactly like IPrintLn in-game.

Not the best, but I guess it has it's use. Since you can give a custom duration. That's what the int means, it is a whole number (no decimal) that will determine how long the message is displayed, that means you can use "RandomInt" to randomize the output duration.

Anyway, you can do concatenation and all the rest with this the same as the other 2 functions.
Final Words
So, another tut, I feel like I am going in circles with these sometimes, but I guess it's helping someone out there, I might make a playing sounds on trigger at somepoint, but we'll see how it goes. For now, I guess it's open to ideas if anyone has anything. Also, I am starting work on the 16th, so I might not upload anything for awhile, if you need help you're always welcome to add me.


Thanks, Johnathon.