Hi, I just signed up onto the Forums now that they're back up. I have some cog troubles. I need this cog to send a message to the master cog once the missileboat reaches frame 1.
The Cog
symbols
message startup
message user0
message arrived
thing missileboat
thing door0_0 linkid=0
thing door0_1 linkid=0
thing door1_0
thing door1_1
thing door2_0
thing door2_1
thing door3_0
thing door3_1
thing platform0
thing platform1
thing platform2
thing platform3
thing platform4
thing platform5
thing camera
int done=0 local
flex doorspeed
flex elevspeed
cog cog
end
code
startup:
ThingLight(missileboat, 0.4, 0.0);
Return;
user0:
Sleep(0.5);
MoveToFrame(door0_0, 1, doorspeed);
MoveToFrame(door0_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door1_0, 1, doorspeed);
MoveToFrame(door1_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door2_0, 1, doorspeed);
MoveToFrame(door2_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door3_0, 1, doorspeed);
MoveToFrame(door3_1, 1, doorspeed);
Return;
arrived:
if(GetSenderId() == 0)
{
if(done) Return;
done=1;
MoveToFrame(missileboat, 1, elevspeed);
MoveToFrame(camera, 1, elevspeed);
MoveToFrame(platform0, 1, elevspeed);
MoveToFrame(platform1, 1, elevspeed);
MoveToFrame(platform2, 1, elevspeed);
MoveToFrame(platform3, 1, elevspeed);
MoveToFrame(platform4, 1, elevspeed);
MoveToFrame(platform5, 1, elevspeed);
}
if(GetCurFrame(missileboat) == 1) SendMessage(cog, user0);
Return;
end
Thanks
------------------
The Sniper Missions. Current project, The X Project
The Cog
symbols
message startup
message user0
message arrived
thing missileboat
thing door0_0 linkid=0
thing door0_1 linkid=0
thing door1_0
thing door1_1
thing door2_0
thing door2_1
thing door3_0
thing door3_1
thing platform0
thing platform1
thing platform2
thing platform3
thing platform4
thing platform5
thing camera
int done=0 local
flex doorspeed
flex elevspeed
cog cog
end
code
startup:
ThingLight(missileboat, 0.4, 0.0);
Return;
user0:
Sleep(0.5);
MoveToFrame(door0_0, 1, doorspeed);
MoveToFrame(door0_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door1_0, 1, doorspeed);
MoveToFrame(door1_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door2_0, 1, doorspeed);
MoveToFrame(door2_1, 1, doorspeed);
Sleep(1.5);
MoveToFrame(door3_0, 1, doorspeed);
MoveToFrame(door3_1, 1, doorspeed);
Return;
arrived:
if(GetSenderId() == 0)
{
if(done) Return;
done=1;
MoveToFrame(missileboat, 1, elevspeed);
MoveToFrame(camera, 1, elevspeed);
MoveToFrame(platform0, 1, elevspeed);
MoveToFrame(platform1, 1, elevspeed);
MoveToFrame(platform2, 1, elevspeed);
MoveToFrame(platform3, 1, elevspeed);
MoveToFrame(platform4, 1, elevspeed);
MoveToFrame(platform5, 1, elevspeed);
}
if(GetCurFrame(missileboat) == 1) SendMessage(cog, user0);
Return;
end
Thanks
------------------
The Sniper Missions. Current project, The X Project
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack