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 → Is this ok?
Is this ok?
2003-02-16, 2:31 PM #1
Here's what I have:

Code:
 Jedi Knight Cog Script
#
# FILENAME.COG
#
# 
# 
#
# 
#
#

symbols
message startup
thing	cam
thing	player		local
sound           SoundToPlay=rm61110.wav	local
end

# ===================================================

code
startup:
		Player = GetLocalPlayerThing();

		// freeze Kyle
		SetActorFlags(Player, 0xa00000);
		StopThing(Player);
		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		Sleep(2.0);
		Print("HoloOfficer: We're decting an Imperal attack force near your area!");
		Sleep(4.0);
		Print("Kyle: How many Stormtrooper transporst are there?");
		Sleep(2.0);
		Print("HoloOfficer: That's the thing, there aren't any life forms!");
		Sleep(3.0);
		Print("Officer: What? That's Not possible!");
		Sleep(2.0);
		PlaySoundLocal(SoundToPlay, 1, 0, 132);
		Sleep(5.0);
		Print("Kyle: There's your answer..");
		
		SetCameraFocus(0, jkGetLocalPlayer());

		if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);
		
		// unfreeze's Kyle
		ClearActorFlags(Player, 0xa00000);


		}
	}

	return;

end

# ........................................................................................

end

2003-02-16, 4:22 PM #2
Useless brackets at the end, and multiple ending "End"s.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-16, 4:55 PM #3
I tried takeing away one of the "ends" but that didnt work. what do you mean by Createthingatpos(GBK, 0, '0 0 0', '0 0 0');?
2003-02-16, 5:02 PM #4
Dude, thats my sig.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-16, 5:19 PM #5
I deleted the

SetCameraFocus(0, jkGetLocalPlayer()); if (jkGetSaberCam() == 1)
CycleCamera();

So know it works [http://forums.massassi.net/html/smile.gif]
2003-02-16, 5:27 PM #6
Yeah, that would cause problems....


I sitll cant figure out why MikeC thought the "JKgetsabercam" get the status of the camera. [http://forums.massassi.net/html/confused.gif]

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-16, 6:29 PM #7
It probably does, but it didn't work in that COG because of the space inbetween the if and the parenthesis. Maybe it's just me, but spaces in there never worked in COG. Tis not like C where it's compiled and run through a preprocessor that removes that evil whitespace.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-02-16, 6:55 PM #8
From the DataMaster:

jkGetSaberCam();

Returns the boolean value of the "Lightsaber auto-camera" checkbox. jkGetSaberCam() returns 1 for checked and 0 for unchecked.


Also, spaces in the code section are irrelevent. One space or one hundred, the cog will still work.

------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-17, 5:52 AM #9
Oh! I remember now. It wasn't ifs I had problems with, I think it was regular function calls, like StopThing (player); never worked. I think.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.

↑ Up to the top!