PDA

View Full Version : cog problem (agaain)



EH_AceCSF
11-14-2003, 08:54 AM
# Not supported by LEC

symbols
message startup
message arrived
message activated

thing Elev linkid=10
thing door0 linkid=10
thing door1 linkid=10
thing door2 linkid=10
thing door3 linkid=10

surface switch0 linkid=0
surface switch1 linkid=1
surface move0 linkid=5
surface move1 linkid=5

flex elev_speed=4
flex door_speed=4
int movestatus=0 local

sound wav0=Activate02.wav
sound wav1=lgclick1.wav
end

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

code

startup:

// sectoradjoins(getthingsector(door1), 0);
MoveToFrame(door0,1,door_speed);
MoveToFrame(door1,1,door_speed);
return;

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

activated:
if (movestatus==0)
{
if (getsenderid()<2) call callfloor;
else if (getsenderid()==5) call closedoor;
}
return;

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

arrived:
if (movestatus==3) call opendoor;
else if (movestatus==2) call move_elev;
else if (movestatus==4) call resetstatus;
return;

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

callfloor:
if (getsenderid()!=getcurframe(elev)) call closedoor;
return;

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

closedoor:
if (getcurframe(elev)==0)
{
movetoframe(door0,0,door_speed);
movetoframe(door1,0,door_speed);
}
else if (getcurframe(elev)==1)
{
movetoframe(door2,0,door_speed);
movetoframe(door3,0,door_speed);
}
setwallcel(switch0,1);
setwallcel(switch1,1);
setwallcel(move0,1);
setwallcel(move1,1);
PlaySoundPos(wav0, SurfaceCenter(GetSenderRef()), 0.6, -1, -1, 0);
movestatus=2;
return;

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

opendoor:
if (getcurframe(elev)==0)
{
// sectoradjoins(getthingsector(door0), 1);
movetoframe(door0,1,door_speed);
movetoframe(door1,1,door_speed);
}
else if (getcurframe(elev)==1)
{
// sectoradjoins(getthingsector(door2), 1);
movetoframe(door2,1,door_speed);
movetoframe(door3,1,door_speed);
}
movestatus=4;
return;

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

resetstatus:
setwallcel(switch0,0);
setwallcel(switch1,0);
setwallcel(move0,0);
setwallcel(move1,0);
PlaySoundPos(wav1, SurfaceCenter(GetSenderRef()), 0.6, -1, -1, 0);
movestatus=0;
return;

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

move_elev:
if (getcurframe(elev)==0)
{
// sectoradjoins(getthingsector(door0), 0);
movetoframe(elev,1,elev_speed);
}
else if (getcurframe(elev)==1)
{
// sectoradjoins(getthingsector(door2), 0);
movetoframe(elev,0,elev_speed);
}
movestatus=3;
return;
end


What is wrong? Simple, when elev is on lover floor it works OK, but when it went to upper floor doors dont open, and i cant send it back down http://forums.massassi.net/html/frown.gif

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..

Edward
11-14-2003, 03:45 PM
Did a quick browse and found that you haven't specified the callfloor or closedoor, etc, messages in the symbols.

/Edward

EH_AceCSF
11-15-2003, 01:21 AM
oh well... symbol message is need only by self-calling messages (like activited, startups etc, called in specyficted moment by GAME). Other elements dont need to be specyficted if they are calleby by call <message>

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..

[SF]pjb
11-17-2003, 04:43 PM
hmm.. now i dont know if its right but..

i think JK has a limit to the number of messages you can actualy call.

in several of my cogs where i have lots of messages the cog for some reson wont call a message it should have.

so i guess you cant have more than so meny messages... but i could be wong..

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's (http://www.geocities.com/SF_PJB1)

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior