DogSRoOL
07-19-2004, 06:43 PM
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 (http://www.local6.com/news/2116865/detail.html)
DogSRoOL
07-20-2004, 09:57 AM
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 (http://www.local6.com/news/2116865/detail.html)
Edward
07-20-2004, 02:50 PM
Supprised that there is no answere... I guess you could learn something from an example COG.
# 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
F-Body
07-20-2004, 07:08 PM
Im pretty sure that keyframes are synched, depending on the cog's flags that called them.
------------------
nil nip nada zip zero naught lip zil
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.