Ok. i said "complex" so people wouldn't think i had trouble with that normal sector enter/exit zero-g cog here at massassi. The problem isn't really with the zero G part of my cog, but the prep room for it. Here's how i'm gonna do this,
I'll put a pic of the layout and stuff i am useing the cog in, then below that i will put the cog. and hopefully a great and wise cogger will come along and see what i am doing worng. the problem with this cog is that when i go to the "doorin" and try to open it, NOTHING AT ALL HAPPENS! it's really pissing me off, so please read on to help me out.
That's it! took me a while to write it cuz i'm a newbie cogger, so plz help me out here!
------------------
The Sith Mercenaries
www.sithmercenaries.8m.com
I'll put a pic of the layout and stuff i am useing the cog in, then below that i will put the cog. and hopefully a great and wise cogger will come along and see what i am doing worng. the problem with this cog is that when i go to the "doorin" and try to open it, NOTHING AT ALL HAPPENS! it's really pissing me off, so please read on to help me out.
Code:
# Jedi Knight Cog Script # # slzero-g.cog # # Cog for the zero-g and the prep room in SM HQ. # # This Cog is Not supported by LucasArts Entertainment Co symbols surface prepswitch=-1 linkid=1 thing doorin=-1 linkid=2 thing doorout=-1 linkid=3 sector preproom=-1 nolink sector enteringprep=-1 nolink sector exitingprep=-1 nolink sector entering=-1 nolink sector exiting=-1 nolink sound prepcomplete=-1 sound prepinuse=-1 sound noexit=-1 sound only1=-1 sound deprepcomplete=-1 sound deprep=-1 sound prep=-1 int zeroed=0 local int pepsinprep local flex speedofdoors=4 flex delaytime=1 message activated message killed thing user local end # ======================================================================================== code activated: if( getsenderid() == 1 ) { if( zeroged == 0 ) { user = GetPlayerThing(); setactorflags(user, 0xa00000); setwallcel(prepswitch, 1); ClearPhysicsFlags(user, 0x1); SetPhysicsFlags(user, 0x2000); playsoundthing(prepcomplete, user, 1, -1, 5, 0x80); delay(getsoundlen(prepcomplete)); ClearActorFlags(user, 0xa00000); zeroed = 1; setwallcel(prepswitch, 0); return; } if( zeroged == 1 ) { user = GetPlayerThing(); setactorflags(user, 0xa00000); setwallcel(prepswitch, 1); ClearPhysicsFlags(user, 0x2000); SetPhysicsFlags(user, 0x1); playsoundthing(deprepcomplete, user, 1, -1, 5, 0x80); delay(getsoundlen(deprepcomplete)); ClearActorFlags(user, 0xa00000); zeroed = 0; setwallcel(prepswitch, 0); return; } return; } if( getsenderid() == 2 ) { user = GetPlayerThing(); cursector = GetThingSector(user); if( cursector == entering ) { call outsidein; } if( cursector == exiting ) { call insideout; } return; } if( getsenderid() == 3 ) { user = GetPlayerThing(); cursector = GetThingSector(user); if( cursector == enteringprep ) { call outsideinprep; } if( cursector == exitingprep ) { call insideoutprep; } return; } return; outsidein: pepsinprep = GetSectorPlayerCount(preproom); if( pepsinprep != 0 ) { user = GetPlayerThing(); playsoundthing(inuse, user, 1, -1, 5, 0x80); return; } MoveToFrame(doorin, 1, speedofdoors); waitforstop(doorin); sleep(delaytime); movetoframe(doorin, 0, speedofdoors); return; insideout: if( zeroged == 1 ) { user = GetPlayerThing(); playsoundthing(deprep, user, 1, -1, 5, 0x80); return; } pepsinprep = GetSectorPlayerCount(preproom); if( pepsinprep != 1 ) { user = GetPlayerThing(); playsoundthing(only1, user, 1, -1, 5, 0x80); return; } MoveToFrame(doorin, 1, speedofdoors); waitforstop(doorin); sleep(delaytime); movetoframe(doorin, 0, speedofdoors); return; outsideinprep: pepsinprep = GetSectorPlayerCount(preproom); if( pepsinprep != 0 ) { user = GetPlayerThing(); playsoundthing(inuse, user, 1, -1, 5, 0x80); return; } MoveToFrame(doorout, 1, speedofdoors); waitforstop(doorout); sleep(delaytime); movetoframe(doorout, 0, speedofdoors); return; insideoutprep: if( zeroged == 0 ) { user = GetPlayerThing(); playsoundthing(prep, user, 1, -1, 5, 0x80); return; } pepsinprep = GetSectorPlayerCount(preproom); if( pepsinprep != 1 ) { user = GetPlayerThing(); playsoundthing(only1, user, 1, -1, 5, 0x80); return; } MoveToFrame(doorout, 1, speedofdoors); waitforstop(doorout); sleep(delaytime); movetoframe(doorout, 0, speedofdoors); return; killed: user = GetPlayerThing(); ClearPhysicsFlags(user, 0x2000); SetPhysicsFlags(user, 0x1); return; # ........................................................................................ end
That's it! took me a while to write it cuz i'm a newbie cogger, so plz help me out here!
------------------
The Sith Mercenaries
www.sithmercenaries.8m.com