Cog Quiz

Week 9 - Answer

Prev - Exit - Next

Show Quiz

Level 1

Yes, it will call a model called "Index7" in the symbols and executes the command.


Level 2

This is a matter of value attachments on variables. I'm going to explain this thoroughly while telling you the answers.

The answer is that it needs symbols from "Index0" to "Index7", if any of them are lacking, it is likely to crash the game. This function is a bit fragile. Index0[7] is same as Index7, so as Index0[a+b] in the question. it replaces the 0 and adds the number after that in there as 1 variable.

You can also say Index[a+b], but in this case, the symbols section must have "Index" rather than "Index0".

This is extremely useful when it comes to call multiple resources varying on a certain situation. For example, the use of "for". This can set the model of players in 1 line. Simplifying as well as availability to handle unknown number of value attachments. (The number of loops vary from GetPlayerCount()) This will turn all players(if all the players are defined as "player0[X]") into "Rat" models.

   for(i = 0; i <= GetPlayerCount(); i = i + 1) SetThingModel(player0[i], Rat);

Level 3

Yes you can put cog commands or anything you like in the "[" "]" brackets as long as JK don't decide to fool you. But it happens, such complicated commands and formula inside that bracket sometimes don't work, so if it doesn't, try to place a new variable defining what you want to be there first.

Example : (Nothing like this is used, just to show how to place complicated variable in the brackets.)

   PutMeIn = GetPhysFlags(plane) + GetActorFlags(Brian) + 3 + rand();
   DestroyThing(Substance0[PutMeIn]);