Cog Quiz

Week 5 - Answer

Prev - Exit - Next

Show Quiz

Level 1

Yes, the method will be explained at level 3.


Level 2

First of all these strings will be able to concatenate strings from jkStringsUNI file, ascii texts you type in and/or player names. By using these verbs, JK can print out any string in 1 line. The example is in the above question.

jkStringClear() - This verb will clear any concatenation made before.Only 1 concatenation can be stored by JK memory, so whenever making a new line of strings, you must first clear the lines, or it will keep adding the strings to the old concatenations.
Use : jkStringClear();

jkStringConcatAsciiString() - This as it reads will concatenate ascii strings. So whatever you type in the parenthesis will be concatenated, but as it's a direct input, if you rather use jkStringConcatUNIString()(below), it will be more stable for JK to handle, though this is easier to use.
Use : jkStringConcatAsciiString("texts here");

jkStringConcatPlayerName() - This is self explanatory, but this one will concatenate the player name used in JK, the name shown will be the one you register at the start of JK.
Use : jkStringConcatPlayerName(playerValue);

jkStringConcatUNIString() - This one will pull a string from jkstrings.uni file in ui folder in res2.gob or the one you made in ui folder. As above lines explain, this is more of a stable function to output a string.
Use : jkStringConcatUNIString(stringInt);

The stringInt is the integer in the jkStrings.uni under "COG_X", where X is the stringInt.

jkStringOutPut() -The important fact is that even if you concatenate strings, nothing will be printed out yet. So, this is the one to output the concatenation to the screen. The verb can set to whom the string should be displayed and by whom the string was played.
Use : jkStringOutPut(playerValue1, playerValue2);

The first player value is to whom the string will be played, leave it as -3 to print out to everyone in game. The second player value will add this following part to the message displayed. "Whoever said : (texts)", so leave it as -1 to just print out the line without any player names mentioned. There is also a verb that adds a space in between concatenations, but this can done by just adding a space to the string with ascii string concatenation, only needed when pulling lines out of jkstrings.uni.
Use : jkStringConcatSpace();


Level 3

So in order to accomplish the first question, "Hello (player name)! Welcome to my level.", it is easy by using the verbs listed above.

jkStringClear();
jkStringConcatAsciiString("Hello ");
jkStringConcatPlayerName(GetLocalPlayerThing());
jkStringConcatAsciiString("! Welcome to my level.");
jkStringOutPut(GetLocalPlayerThing(), -1);

That's it!