i got a cog off this website called lightswitch.cog - it works but i need more sector options to be in it because there are alot of sectors i need the cog to affect. im not good at cogging but i did the best i could in trying to add more to it. it works fine when you are the host but when you are the one joining the game only a few sectors are affected by the cog. Heres what it looks like with all the editing i did:
[Code tags, please...]
thats what it looks now that ive edited it. can someone help me so that this cog will work for everyone in a multiplayer game? thanks.
Code:
# Jedi Knight Cog Script
#
# Adjusts Sector extralight on activation of a switch
#
# 11/20/98 Nightmare edited by WAR_Nuker
# ========================================================================================
symbols
message startup
message activated
sound poweroff=activate04.wav
sound poweron=activate01.wav
surface switch
flex onlight=.75
flex offlight=0
int power local
sector sector00
sector sector01
sector sector02
sector sector03
sector sector04
sector sector05
sector sector06
sector sector07
sector sector08
sector sector09
sector sector10
sector sector11
sector sector12
sector sector13
sector sector14
sector sector15
sector sector16
sector sector17
sector sector18
sector sector19
sector sector20
sector sector21
sector sector22
sector sector23
sector sector24
sector sector25
sector sector26
sector sector27
sector sector28
sector sector29
sector sector30
sector sector31
sector sector32
sector sector33
sector sector34
sector sector35
sector sector36
sector sector37
sector sector38
sector sector39
sector sector40
sector sector41
sector sector42
sector sector43
sector sector44
sector sector45
sector sector46
sector sector47
sector sector48
sector sector49
sector sector50
sector sector51
sector sector52
sector sector53
sector sector54
sector sector55
sector sector56
sector sector57
sector sector58
sector sector59
sector sector60
sector sector61
sector sector62
sector sector63
sector sector64
sector sector65
sector sector66
sector sector67
sector sector68
sector sector69
sector sector70
sector sector71
sector sector72
sector sector73
sector sector74
sector sector75
sector sector76
sector sector77
sector sector78
sector sector79
sector sector80
sector sector81
sector sector82
sector sector83
sector sector84
sector sector85
sector sector86
sector sector87
sector sector88
sector sector89
sector sector90
sector sector91
sector sector92
sector sector93
sector sector94
sector sector95
sector sector96
sector sector97
sector sector98
sector sector99
sector sector100
sector sector101
sector sector102
sector sector103
sector sector104
sector sector105
sector sector106
sector sector107
sector sector108
sector sector109
sector sector110
sector sector111
sector sector112
sector sector113
sector sector114
end
# ========================================================================================
code
startup:
SetWallCel(switch,0); // set the switch to the on position
power=1;
SetSectorLight(sector00, onlight, 0); // set all sector light
SetSectorLight(sector01, onlight, 0); // values to "on"
SetSectorLight(sector02, onlight, 0);
SetSectorLight(sector03, onlight, 0);
SetSectorLight(sector04, onlight, 0);
SetSectorLight(sector05, onlight, 0);
SetSectorLight(sector06, onlight, 0);
SetSectorLight(sector07, onlight, 0);
SetSectorLight(sector08, onlight, 0);
SetSectorLight(sector09, onlight, 0);
SetSectorLight(sector10, onlight, 0);
SetSectorLight(sector11, onlight, 0);
SetSectorLight(sector12, onlight, 0);
SetSectorLight(sector13, onlight, 0);
SetSectorLight(sector14, onlight, 0);
SetSectorLight(sector15, onlight, 0);
SetSectorLight(sector16, onlight, 0);
SetSectorLight(sector17, onlight, 0);
SetSectorLight(sector18, onlight, 0);
SetSectorLight(sector19, onlight, 0);
SetSectorLight(sector20, onlight, 0);
SetSectorLight(sector21, onlight, 0);
SetSectorLight(sector22, onlight, 0);
SetSectorLight(sector23, onlight, 0);
SetSectorLight(sector24, onlight, 0);
SetSectorLight(sector25, onlight, 0);
SetSectorLight(sector26, onlight, 0);
SetSectorLight(sector27, onlight, 0);
SetSectorLight(sector28, onlight, 0);
SetSectorLight(sector29, onlight, 0);
SetSectorLight(sector30, onlight, 0);
SetSectorLight(sector31, onlight, 0);
SetSectorLight(sector32, onlight, 0);
SetSectorLight(sector33, onlight, 0);
SetSectorLight(sector34, onlight, 0);
SetSectorLight(sector35, onlight, 0);
SetSectorLight(sector36, onlight, 0);
SetSectorLight(sector37, onlight, 0);
SetSectorLight(sector38, onlight, 0);
SetSectorLight(sector39, onlight, 0);
SetSectorLight(sector40, onlight, 0);
SetSectorLight(sector41, onlight, 0);
SetSectorLight(sector42, onlight, 0);
SetSectorLight(sector43, onlight, 0);
SetSectorLight(sector44, onlight, 0);
SetSectorLight(sector45, onlight, 0);
SetSectorLight(sector46, onlight, 0);
SetSectorLight(sector47, onlight, 0);
SetSectorLight(sector48, onlight, 0);
SetSectorLight(sector49, onlight, 0);
SetSectorLight(sector50, onlight, 0);
SetSectorLight(sector51, onlight, 0);
SetSectorLight(sector52, onlight, 0);
SetSectorLight(sector53, onlight, 0);
SetSectorLight(sector54, onlight, 0);
SetSectorLight(sector55, onlight, 0);
SetSectorLight(sector56, onlight, 0);
SetSectorLight(sector57, onlight, 0);
SetSectorLight(sector58, onlight, 0);
SetSectorLight(sector59, onlight, 0);
SetSectorLight(sector60, onlight, 0);
SetSectorLight(sector61, onlight, 0);
SetSectorLight(sector62, onlight, 0);
SetSectorLight(sector63, onlight, 0);
SetSectorLight(sector64, onlight, 0);
SetSectorLight(sector65, onlight, 0);
SetSectorLight(sector66, onlight, 0);
SetSectorLight(sector67, onlight, 0);
SetSectorLight(sector68, onlight, 0);
SetSectorLight(sector69, onlight, 0);
SetSectorLight(sector70, onlight, 0);
SetSectorLight(sector71, onlight, 0);
SetSectorLight(sector72, onlight, 0);
SetSectorLight(sector73, onlight, 0);
SetSectorLight(sector74, onlight, 0);
SetSectorLight(sector75, onlight, 0);
SetSectorLight(sector76, onlight, 0);
SetSectorLight(sector77, onlight, 0);
SetSectorLight(sector78, onlight, 0);
SetSectorLight(sector79, onlight, 0);
SetSectorLight(sector80, onlight, 0);
SetSectorLight(sector81, onlight, 0);
SetSectorLight(sector82, onlight, 0);
SetSectorLight(sector83, onlight, 0);
SetSectorLight(sector84, onlight, 0);
SetSectorLight(sector85, onlight, 0);
SetSectorLight(sector86, onlight, 0);
SetSectorLight(sector87, onlight, 0);
SetSectorLight(sector88, onlight, 0);
SetSectorLight(sector89, onlight, 0);
SetSectorLight(sector90, onlight, 0);
SetSectorLight(sector91, onlight, 0);
SetSectorLight(sector92, onlight, 0);
SetSectorLight(sector93, onlight, 0);
SetSectorLight(sector94, onlight, 0);
SetSectorLight(sector95, onlight, 0);
SetSectorLight(sector96, onlight, 0);
SetSectorLight(sector97, onlight, 0);
SetSectorLight(sector98, onlight, 0);
SetSectorLight(sector99, onlight, 0);
SetSectorLight(sector100, onlight, 0);
SetSectorLight(sector101, onlight, 0);
SetSectorLight(sector102, onlight, 0);
SetSectorLight(sector103, onlight, 0);
SetSectorLight(sector104, onlight, 0);
SetSectorLight(sector105, onlight, 0);
SetSectorLight(sector106, onlight, 0);
SetSectorLight(sector107, onlight, 0);
SetSectorLight(sector108, onlight, 0);
SetSectorLight(sector109, onlight, 0);
SetSectorLight(sector110, onlight, 0);
SetSectorLight(sector111, onlight, 0);
SetSectorLight(sector112, onlight, 0);
SetSectorLight(sector113, onlight, 0);
SetSectorLight(sector114, onlight, 0);
return;
activated:
if(power == 0)
{
SetWallCel(switch,0); // do effects
PlaySoundPos(poweron, SurfaceCenter(switch), 1.0, -1, -1, 0);
SetSectorLight(sector00, onlight, 0); // set all sector light
SetSectorLight(sector01, onlight, 0); // values to "on"
SetSectorLight(sector02, onlight, 0);
SetSectorLight(sector03, onlight, 0);
SetSectorLight(sector04, onlight, 0);
SetSectorLight(sector05, onlight, 0);
SetSectorLight(sector06, onlight, 0);
SetSectorLight(sector07, onlight, 0);
SetSectorLight(sector08, onlight, 0);
SetSectorLight(sector09, onlight, 0);
SetSectorLight(sector10, onlight, 0);
SetSectorLight(sector11, onlight, 0);
SetSectorLight(sector12, onlight, 0);
SetSectorLight(sector13, onlight, 0);
SetSectorLight(sector14, onlight, 0);
SetSectorLight(sector15, onlight, 0);
SetSectorLight(sector16, onlight, 0);
SetSectorLight(sector17, onlight, 0);
SetSectorLight(sector18, onlight, 0);
SetSectorLight(sector19, onlight, 0);
SetSectorLight(sector20, onlight, 0);
SetSectorLight(sector21, onlight, 0);
SetSectorLight(sector22, onlight, 0);
SetSectorLight(sector23, onlight, 0);
SetSectorLight(sector24, onlight, 0);
SetSectorLight(sector25, onlight, 0);
SetSectorLight(sector26, onlight, 0);
SetSectorLight(sector27, onlight, 0);
SetSectorLight(sector28, onlight, 0);
SetSectorLight(sector29, onlight, 0);
SetSectorLight(sector30, onlight, 0);
SetSectorLight(sector31, onlight, 0);
SetSectorLight(sector32, onlight, 0);
SetSectorLight(sector33, onlight, 0);
SetSectorLight(sector34, onlight, 0);
SetSectorLight(sector35, onlight, 0);
SetSectorLight(sector36, onlight, 0);
SetSectorLight(sector37, onlight, 0);
SetSectorLight(sector38, onlight, 0);
SetSectorLight(sector39, onlight, 0);
SetSectorLight(sector40, onlight, 0);
SetSectorLight(sector41, onlight, 0);
SetSectorLight(sector42, onlight, 0);
SetSectorLight(sector43, onlight, 0);
SetSectorLight(sector44, onlight, 0);
SetSectorLight(sector45, onlight, 0);
SetSectorLight(sector46, onlight, 0);
SetSectorLight(sector47, onlight, 0);
SetSectorLight(sector48, onlight, 0);
SetSectorLight(sector49, onlight, 0);
SetSectorLight(sector50, onlight, 0);
SetSectorLight(sector51, onlight, 0);
SetSectorLight(sector52, onlight, 0);
SetSectorLight(sector53, onlight, 0);
SetSectorLight(sector54, onlight, 0);
SetSectorLight(sector55, onlight, 0);
SetSectorLight(sector56, onlight, 0);
SetSectorLight(sector57, onlight, 0);
SetSectorLight(sector58, onlight, 0);
SetSectorLight(sector59, onlight, 0);
SetSectorLight(sector60, onlight, 0);
SetSectorLight(sector61, onlight, 0);
SetSectorLight(sector62, onlight, 0);
SetSectorLight(sector63, onlight, 0);
SetSectorLight(sector64, onlight, 0);
SetSectorLight(sector65, onlight, 0);
SetSectorLight(sector66, onlight, 0);
SetSectorLight(sector67, onlight, 0);
SetSectorLight(sector68, onlight, 0);
SetSectorLight(sector69, onlight, 0);
SetSectorLight(sector70, onlight, 0);
SetSectorLight(sector71, onlight, 0);
SetSectorLight(sector72, onlight, 0);
SetSectorLight(sector73, onlight, 0);
SetSectorLight(sector74, onlight, 0);
SetSectorLight(sector75, onlight, 0);
SetSectorLight(sector76, onlight, 0);
SetSectorLight(sector77, onlight, 0);
SetSectorLight(sector78, onlight, 0);
SetSectorLight(sector79, onlight, 0);
SetSectorLight(sector80, onlight, 0);
SetSectorLight(sector81, onlight, 0);
SetSectorLight(sector82, onlight, 0);
SetSectorLight(sector83, onlight, 0);
SetSectorLight(sector84, onlight, 0);
SetSectorLight(sector85, onlight, 0);
SetSectorLight(sector86, onlight, 0);
SetSectorLight(sector87, onlight, 0);
SetSectorLight(sector88, onlight, 0);
SetSectorLight(sector89, onlight, 0);
SetSectorLight(sector90, onlight, 0);
SetSectorLight(sector91, onlight, 0);
SetSectorLight(sector92, onlight, 0);
SetSectorLight(sector93, onlight, 0);
SetSectorLight(sector94, onlight, 0);
SetSectorLight(sector95, onlight, 0);
SetSectorLight(sector96, onlight, 0);
SetSectorLight(sector97, onlight, 0);
SetSectorLight(sector98, onlight, 0);
SetSectorLight(sector99, onlight, 0);
SetSectorLight(sector100, onlight, 0);
SetSectorLight(sector101, onlight, 0);
SetSectorLight(sector102, onlight, 0);
SetSectorLight(sector103, onlight, 0);
SetSectorLight(sector104, onlight, 0);
SetSectorLight(sector105, onlight, 0);
SetSectorLight(sector106, onlight, 0);
SetSectorLight(sector107, onlight, 0);
SetSectorLight(sector108, onlight, 0);
SetSectorLight(sector109, onlight, 0);
SetSectorLight(sector110, onlight, 0);
SetSectorLight(sector111, onlight, 0);
SetSectorLight(sector112, onlight, 0);
SetSectorLight(sector113, onlight, 0);
SetSectorLight(sector114, onlight, 0);
power = 1;
return;
}
if(power == 1)
{
SetWallCel(switch,1); // do effects
PlaySoundPos(poweroff, SurfaceCenter(switch), 1.0, -1, -1, 0);
SetSectorLight(sector00, offlight, 0); // set all sector lights to
SetSectorLight(sector01, offlight, 0); // the "off" value
SetSectorLight(sector02, offlight, 0);
SetSectorLight(sector03, offlight, 0);
SetSectorLight(sector04, offlight, 0);
SetSectorLight(sector05, offlight, 0);
SetSectorLight(sector06, offlight, 0);
SetSectorLight(sector07, offlight, 0);
SetSectorLight(sector08, offlight, 0);
SetSectorLight(sector09, offlight, 0);
SetSectorLight(sector10, offlight, 0);
SetSectorLight(sector11, offlight, 0);
SetSectorLight(sector12, offlight, 0);
SetSectorLight(sector13, offlight, 0);
SetSectorLight(sector14, offlight, 0);
SetSectorLight(sector15, offlight, 0);
SetSectorLight(sector16, offlight, 0);
SetSectorLight(sector17, offlight, 0);
SetSectorLight(sector18, offlight, 0);
SetSectorLight(sector19, offlight, 0);
SetSectorLight(sector20, offlight, 0);
SetSectorLight(sector21, offlight, 0);
SetSectorLight(sector22, offlight, 0);
SetSectorLight(sector23, offlight, 0);
SetSectorLight(sector24, offlight, 0);
SetSectorLight(sector25, offlight, 0);
SetSectorLight(sector26, offlight, 0);
SetSectorLight(sector27, offlight, 0);
SetSectorLight(sector28, offlight, 0);
SetSectorLight(sector29, offlight, 0);
SetSectorLight(sector30, offlight, 0);
SetSectorLight(sector31, offlight, 0);
SetSectorLight(sector32, offlight, 0);
SetSectorLight(sector33, offlight, 0);
SetSectorLight(sector34, offlight, 0);
SetSectorLight(sector35, offlight, 0);
SetSectorLight(sector36, offlight, 0);
SetSectorLight(sector37, offlight, 0);
SetSectorLight(sector38, offlight, 0);
SetSectorLight(sector39, offlight, 0);
SetSectorLight(sector40, offlight, 0);
SetSectorLight(sector41, offlight, 0);
SetSectorLight(sector42, offlight, 0);
SetSectorLight(sector43, offlight, 0);
SetSectorLight(sector44, offlight, 0);
SetSectorLight(sector45, offlight, 0);
SetSectorLight(sector46, offlight, 0);
SetSectorLight(sector47, offlight, 0);
SetSectorLight(sector48, offlight, 0);
SetSectorLight(sector49, offlight, 0);
SetSectorLight(sector50, offlight, 0);
SetSectorLight(sector51, offlight, 0);
SetSectorLight(sector52, offlight, 0);
SetSectorLight(sector53, offlight, 0);
SetSectorLight(sector54, offlight, 0);
SetSectorLight(sector55, offlight, 0);
SetSectorLight(sector56, offlight, 0);
SetSectorLight(sector57, offlight, 0);
SetSectorLight(sector58, offlight, 0);
SetSectorLight(sector59, offlight, 0);
SetSectorLight(sector60, offlight, 0);
SetSectorLight(sector61, offlight, 0);
SetSectorLight(sector62, offlight, 0);
SetSectorLight(sector63, offlight, 0);
SetSectorLight(sector64, offlight, 0);
SetSectorLight(sector65, offlight, 0);
SetSectorLight(sector66, offlight, 0);
SetSectorLight(sector67, offlight, 0);
SetSectorLight(sector68, offlight, 0);
SetSectorLight(sector69, offlight, 0);
SetSectorLight(sector70, offlight, 0);
SetSectorLight(sector71, offlight, 0);
SetSectorLight(sector72, offlight, 0);
SetSectorLight(sector73, offlight, 0);
SetSectorLight(sector74, offlight, 0);
SetSectorLight(sector75, offlight, 0);
SetSectorLight(sector76, offlight, 0);
SetSectorLight(sector77, offlight, 0);
SetSectorLight(sector78, offlight, 0);
SetSectorLight(sector79, offlight, 0);
SetSectorLight(sector80, offlight, 0);
SetSectorLight(sector81, offlight, 0);
SetSectorLight(sector82, offlight, 0);
SetSectorLight(sector83, offlight, 0);
SetSectorLight(sector84, offlight, 0);
SetSectorLight(sector85, offlight, 0);
SetSectorLight(sector86, offlight, 0);
SetSectorLight(sector87, offlight, 0);
SetSectorLight(sector88, offlight, 0);
SetSectorLight(sector89, offlight, 0);
SetSectorLight(sector90, offlight, 0);
SetSectorLight(sector91, offlight, 0);
SetSectorLight(sector92, offlight, 0);
SetSectorLight(sector93, offlight, 0);
SetSectorLight(sector94, offlight, 0);
SetSectorLight(sector95, offlight, 0);
SetSectorLight(sector96, offlight, 0);
SetSectorLight(sector97, offlight, 0);
SetSectorLight(sector98, offlight, 0);
SetSectorLight(sector99, offlight, 0);
SetSectorLight(sector100, offlight, 0);
SetSectorLight(sector101, offlight, 0);
SetSectorLight(sector102, offlight, 0);
SetSectorLight(sector103, offlight, 0);
SetSectorLight(sector104, offlight, 0);
SetSectorLight(sector105, offlight, 0);
SetSectorLight(sector106, offlight, 0);
SetSectorLight(sector107, offlight, 0);
SetSectorLight(sector108, offlight, 0);
SetSectorLight(sector109, offlight, 0);
SetSectorLight(sector110, offlight, 0);
SetSectorLight(sector111, offlight, 0);
SetSectorLight(sector112, offlight, 0);
SetSectorLight(sector113, offlight, 0);
SetSectorLight(sector114, offlight, 0);
power = 0;
return;
}
return;
end[Code tags, please...]
thats what it looks now that ive edited it. can someone help me so that this cog will work for everyone in a multiplayer game? thanks.

). Hopefully it will work in MP (it should). You can even select whether to have the lights on or off at startup 
