Here's an example of concat verbs in use:
jkStringClear(); jkStringConcatAsciiString("The number of players in this game is: "); jkStringConcatInt(GetNumPlayers()); jkStringOutput(-3, -1);Notice in that example that jkStringClear() is run before the concatenation. Even after the string has been outputted, it is still in memory. But because all concatenation code in cog clears the string before the concatenation, this will not cause problems.
The jkstrings.uni holds strings that will be used during normal gameplay in any level. Strings like "Using Bacta" and "Fists" are stored in this file. Cogstrings.uni is a level file that holds the strings that are to be used by an episode. "Locked!" and "This looks interesting!" come from the cogstrings of The Force Within.
In both of these files, strings are defined like this: "COG_x" 0 "string" - where x is the number of the string. It is this number that cog verbs use
to locate the string. If you give a verb the number to a string that does not exist, you'll see "COG_yourNum" print on the screen.
Destinations
Output Destinations | |||
---|---|---|---|
Destination | Player that receives the message: | ||
0, 1, 2, etc. | If there's a player with the thingref of this dest, the message is sent to him. Otherwise, it's local. | ||
-1 | Local player. | ||
-2 | Unknown. | ||
-3 | Everyone. |