Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → objective problems
objective problems
2002-08-02, 2:15 PM #1
im having a hard time getting my objectives to work, i set up the cogstrings.uni file correctly, and the cog looks right to me, because for the first objective, the cog is set so the SetGoalFlags is set to (player, 0, 1) and from what i understand, the 0 is the # of the objective, and the 1 means that it will be shown without haing to complete another objective. heres what the cog looks like...
Code:
symbols

sound			keysound=Accomplish1.WAV
thing	player
sector	sector
message	entered
end

code

entered:
	PlaySoundLocal(keysound, 1.0, 0.0, 0);
	Player = GetLocalPlayerThing();
	SetGoalFlags(player, 0, 1);
	jkPrintUNIString(player, 350);
	jkPrintUNIString(player, 802);
	Sleep(8.0);
	Return;
end

...but the problem is that i cant see the objective until after i complete it. plus the cog plays continuously. how do i set the cog so it only plays once, and so that it will show the objective right away?

[This message has been edited by finity5 (edited August 02, 2002).]

[This message has been edited by SaberMaster (edited August 03, 2002).]
2002-08-03, 6:35 AM #2
Have you assigned the string offset for the goals to bin 99? It's typically 1000 for the first level in an episode.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-08-03, 5:30 PM #3
um, no, not entirely sure what you mean
2002-08-04, 7:11 AM #4
Here's an excerpt from JED's none-too-perfect startup cog:
Code:
// Initialise Goals
SetInv(player, 99, 1000);
SetGoalFlags(player, 0, 1);
SetGoalFlags(player, 1, 1);

That SetInv() command is used to set the string offset of the level. This corresponds to the number of your strings in the cogstrings.uni. From the cogstrings.uni file:
Code:
"GOAL_01000" 0 "Objective 1"
"GOAL_01001" 0 "Objective 2"

Notice the numbers start at 1000. If you don't give bin 99 the level's string offset in the cogstrings.uni, then JK won't be able to find the text for the objectives.

If your other cog can display the objectives as completed, then look in that cog for the SetInv() command.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!