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 → MP Cogging...
MP Cogging...
2004-07-19, 3:43 PM #1
Does anyone happen to have a list of things that require special attention in MP cogging?

At the moment, I'm wanting to know about synchronizing keyframes, but I'll want to know other stuff in the future. Might as well learn it all at once, right? [http://forums.massassi.net/html/wink.gif]

------------------
For a healty meal, eat mashed potatoes, peas, and catloaf.
"Massassi's cuttin' into my free time, man."

Valuable Life Lesson: Frog + Potato Gun = Blindness
Catloaf, meet mouseloaf.
My music
2004-07-20, 6:57 AM #2
Anyone?
*echoes*

------------------
For a healty meal, eat mashed potatoes, peas, and catloaf.
"Massassi's cuttin' into my free time, man."

Valuable Life Lesson: Frog + Potato Gun = Blindness
Catloaf, meet mouseloaf.
My music
2004-07-20, 11:50 AM #3
Supprised that there is no answere... I guess you could learn something from an example COG.

Code:
# Bump Light
#
# By Edward and help from DSLS_DeathSythe
#===============
flags=0x240
symbols
#---------------
message		activated
message		damaged
message		trigger
message		timer

thing		light		mask=0x408
thing		x

keyframe	bump

int		is_busy=0	local
int		bump_trig
#---------------
end
#===============
code
#---------------
startup:
	//-Clear the IS_BUSY...
	is_busy = 0;
	ThingLight(light, 0, 0.01);
return;
#---------------
activated:
	//-Check to see if the cog is busy...
	if(is_busy == 1)
		return;
	//-Make sure it was the light...
	if(GetSenderRef() != light)
		return;
	SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
damaged:
	//-Check to see if the cog is busy...
	if(is_busy == 1)
		return;
	//-Make sure it was the light...
	if(GetSenderRef() != light)
		return;
	SendTrigger(-1, bump_trig, 0, 0, 0, 0);
return;
#---------------
trigger:
	//-Make sure that its the right trigger...
	if(GetSourceRef() != bump_trig)
		return;
	//-Check to see if the cog is busy...
	if(is_busy == 1)
		return;
	//-Make the cog busy and set a timer that is as
	//-long as the bump keyframe...
	is_busy = 1;
	SetTimerEx(GetKeyLen(bump), 1, 0, 0);
	//-Play key and turn the light on...
	PlayKey(light, bump, 1, 0x2);
	ThingLight(x, 1, 0.9);
	SetTimerEx(1.0, 2, 0, 0);
return;
#---------------
timer:
	//-Clear the IS_BUSY...
	if(GetSenderID() == 1)
	{
		is_busy = 0;
		return;
	}
	//-Turn light off...
	else
	if(GetSenderID() == 2)
		ThingLight(x, 0, 1.1);
return;
#===============
end

OK, this is a basic thing. There is this thing which is a crystal light floating in a claw shaped stand, and if you bump it with your fists, or fire apon it, it will just "sigh". The sigh part is a keyframe that animates the crystal ball so it goes up, and then falls back into place. Enjoy!

/Edward
Edward's Cognative Hazards
2004-07-20, 4:08 PM #4
Im pretty sure that keyframes are synched, depending on the cog's flags that called them.

------------------
nil nip nada zip zero naught lip zil
This is retarded, and I mean drooling at the mouth

↑ Up to the top!