Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Some Unique Cog Requests
Some Unique Cog Requests
2004-07-31, 9:07 AM #1
Alright, for now I want 2 cogs. The first one should do this: set all of the sectors' extra light settings to "0" and change the value of added lights (or dynamic lights) to "0" once a switch is pressed. When the switch is pressed again, the sectors' extra lights and the value of the added lights (dynamic lights) return to the original setting.

Now for the second cog. It should do this: Once a switch is pressed, change the flags on all of the sectors in the level (except for certain ones that can be specified in the placed cogs setting) to underwater. Again, once the switch is pressed again, the sectors' flags return to the previous settings.

I know these may be difficult, but I'd appreciate it if someone could whip these up. Thank-you.

*ALSO* This is for MP, so please make them local.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert

[This message has been edited by Trige (edited July 31, 2004).]
Who made you God to say "I'll take your life from you"?
2004-08-02, 10:56 AM #2
No one? Come on, I know that atleast some attempt could be made on the lighting cog. I've played a level where the dynamic lighting changes to simulate change between day and night, and I've played levels with lightswitches that change the sector's +Extra Light value. Someone please try these.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-02, 12:41 PM #3
Archi-light cant be altered via cog in JK. Sorry, its just not possible.

The underwater cog is possible....youd first need to build a hash containing all the sectors that *originally* were flagged as water, then do the conversion. Then, when you want to undo it, just apply the hash to the level... [http://forums.massassi.net/html/wink.gif]

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-02, 2:29 PM #4
Well, if someone could try making the water cog, I'd appreciate it. I'm not good at cogging at all. Thanks.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-03, 4:56 AM #5
Code:
# A cog
# by cogman  :)

symbols

int     i      local
int     toggle=0     local

surface switch

message activated

end

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

code
activated:
if((getsenderref() == switch) && toggle == 0){
  for(i = 0; i =< getsectorcount(); i = i + 1){
flags = GetSectorFlags(i);
SetSectorFlags(i, 0x2);
}
toggle = 1;
Return;
}
else if(toggle == 1){
toggle = 0;
  for(i = 0; i =< getsectorcount(); i = i + 1){
SetSectorFlags(i, flags);
}
Return;
}
Return;
end



This is a basic script, and is untested thus far. and more then likely there are a few bugs in it (im not so sure the flags will work, so someone should test me.

This was writen on the spot so it is missing some things like the definition for local, I dont remember it.

So its open for modding :)

------------------
:) ;) :) ;) :) ;) :) ;) :) ;) :) ;) Im Happy

[Code tags, please...]

[This message has been edited by GBK (edited August 08, 2004).]
:) ;) :) ;) :) ;) :) ;) :) ;) :) ;) Im Happy
2004-08-03, 7:14 AM #6
True GBK, but he wasn't talking about archi lighting. Extra lighting is different, and can be changed. I believe it's SectorLight() that'll do that. I'll see if I can whip something up later.

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-03, 7:59 AM #7
mine does not work, Dang JK for not useing Arrays [http://forums.massassi.net/html/smile.gif].

------------------
:) ;) :) ;) :) ;) :) ;) :) ;) :) ;) Im Happy
:) ;) :) ;) :) ;) :) ;) :) ;) :) ;) Im Happy
2004-08-03, 2:20 PM #8
JK uses arrays, however you didn't define the array in the symbols section...
Basically, you'd have to go like
Code:
symbols

int flags local
int flags1 local
int flags2 local
int flags3 local
int flags4 local
int flags5 local
int flags6 local
int flags7 local
int flags8 local
int flags9 local


For however big you want the array. Something normal with programming languages... you HAVE to define the variable being used first. So you'd want to set a preset limit on number of sectors. I'll try to fix the code you gave in a minute.

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-03, 11:28 PM #9
Technically, you have to declare a variable before you define it, but I'm splitting hairs now [http://forums.massassi.net/html/wink.gif] - as LKOH_SniperWolf suggests, if you set up your cog so that it recognises what variables it needs first then you should be fine [http://forums.massassi.net/html/smile.gif]

Hope this helps [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

PS: As much as it pains me to say this, unlike earlier editors who didn't have the tools/knowledge, we now have programs like Parsec (http://geocities.com/sabersdomain/ - courtesy of SaberMaster [http://forums.massassi.net/html/biggrin.gif]) that is, or at least should be, integral for the parsing and debugging of any newly created cogs; it would have picked up this little error immediately, so you have no excuses now [http://forums.massassi.net/html/wink.gif] [http://forums.massassi.net/html/biggrin.gif]

------------------
"lucky_jackpot is the smily god..." - gothicX
"jackpot is an evil evil man... so evil, in fact, that he's awesome." - Seb

"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2004-08-05, 6:19 AM #10
Any luck yet?

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-05, 10:29 AM #11
Code:
# Cog to change sectors to underwater, while retaining orignal flags.
# Will handle up to the first 640 level sectors.
# By LKOH_SniperWolf 8/5/04
# Based on code by Cogman

flags=0x240

symbols
int sectorCount local

int i local
int toggle = 0 local

int flags0 local
int flags1 local
int flags2 local
int flags3 local
int flags4 local
int flags5 local
int flags6 local
int flags7 local
int flags8 local
int flags9 local
int flags10 local
int flags11 local
int flags12 local
int flags13 local
int flags14 local
int flags15 local
int flags16 local
int flags17 local
int flags18 local
int flags19 local
int flags20 local
int flags21 local
int flags22 local
int flags23 local
int flags24 local
int flags25 local
int flags26 local
int flags27 local
int flags28 local
int flags29 local
int flags30 local
int flags31 local
int flags32 local
int flags33 local
int flags34 local
int flags35 local
int flags36 local
int flags37 local
int flags38 local
int flags39 local
int flags40 local
int flags41 local
int flags42 local
int flags43 local
int flags44 local
int flags45 local
int flags46 local
int flags47 local
int flags48 local
int flags49 local
int flags50 local
int flags51 local
int flags52 local
int flags53 local
int flags54 local
int flags55 local
int flags56 local
int flags57 local
int flags58 local
int flags59 local
int flags60 local
int flags61 local
int flags62 local
int flags63 local
int flags64 local
int flags65 local
int flags66 local
int flags67 local
int flags68 local
int flags69 local
int flags70 local
int flags71 local
int flags72 local
int flags73 local
int flags74 local
int flags75 local
int flags76 local
int flags77 local
int flags78 local
int flags79 local
int flags80 local
int flags81 local
int flags82 local
int flags83 local
int flags84 local
int flags85 local
int flags86 local
int flags87 local
int flags88 local
int flags89 local
int flags90 local
int flags91 local
int flags92 local
int flags93 local
int flags94 local
int flags95 local
int flags96 local
int flags97 local
int flags98 local
int flags99 local
int flags100 local
int flags101 local
int flags102 local
int flags103 local
int flags104 local
int flags105 local
int flags106 local
int flags107 local
int flags108 local
int flags109 local
int flags110 local
int flags111 local
int flags112 local
int flags113 local
int flags114 local
int flags115 local
int flags116 local
int flags117 local
int flags118 local
int flags119 local
int flags120 local
int flags121 local
int flags122 local
int flags123 local
int flags124 local
int flags125 local
int flags126 local
int flags127 local
int flags128 local
int flags129 local
int flags130 local
int flags131 local
int flags132 local
int flags133 local
int flags134 local
int flags135 local
int flags136 local
int flags137 local
int flags138 local
int flags139 local
int flags140 local
int flags141 local
int flags142 local
int flags143 local
int flags144 local
int flags145 local
int flags146 local
int flags147 local
int flags148 local
int flags149 local
int flags150 local
int flags151 local
int flags152 local
int flags153 local
int flags154 local
int flags155 local
int flags156 local
int flags157 local
int flags158 local
int flags159 local
int flags160 local
int flags161 local
int flags162 local
int flags163 local
int flags164 local
int flags165 local
int flags166 local
int flags167 local
int flags168 local
int flags169 local
int flags170 local
int flags171 local
int flags172 local
int flags173 local
int flags174 local
int flags175 local
int flags176 local
int flags177 local
int flags178 local
int flags179 local
int flags180 local
int flags181 local
int flags182 local
int flags183 local
int flags184 local
int flags185 local
int flags186 local
int flags187 local
int flags188 local
int flags189 local
int flags190 local
int flags191 local
int flags192 local
int flags193 local
int flags194 local
int flags195 local
int flags196 local
int flags197 local
int flags198 local
int flags199 local
int flags200 local
int flags201 local
int flags202 local
int flags203 local
int flags204 local
int flags205 local
int flags206 local
int flags207 local
int flags208 local
int flags209 local
int flags210 local
int flags211 local
int flags212 local
int flags213 local
int flags214 local
int flags215 local
int flags216 local
int flags217 local
int flags218 local
int flags219 local
int flags220 local
int flags221 local
int flags222 local
int flags223 local
int flags224 local
int flags225 local
int flags226 local
int flags227 local
int flags228 local
int flags229 local
int flags230 local
int flags231 local
int flags232 local
int flags233 local
int flags234 local
int flags235 local
int flags236 local
int flags237 local
int flags238 local
int flags239 local
int flags240 local
int flags241 local
int flags242 local
int flags243 local
int flags244 local
int flags245 local
int flags246 local
int flags247 local
int flags248 local
int flags249 local
int flags250 local
int flags251 local
int flags252 local
int flags253 local
int flags254 local
int flags255 local
int flags256 local
int flags257 local
int flags258 local
int flags259 local
int flags260 local
int flags261 local
int flags262 local
int flags263 local
int flags264 local
int flags265 local
int flags266 local
int flags267 local
int flags268 local
int flags269 local
int flags270 local
int flags271 local
int flags272 local
int flags273 local
int flags274 local
int flags275 local
int flags276 local
int flags277 local
int flags278 local
int flags279 local
int flags280 local
int flags281 local
int flags282 local
int flags283 local
int flags284 local
int flags285 local
int flags286 local
int flags287 local
int flags288 local
int flags289 local
int flags290 local
int flags291 local
int flags292 local
int flags293 local
int flags294 local
int flags295 local
int flags296 local
int flags297 local
int flags298 local
int flags299 local
int flags300 local
int flags301 local
int flags302 local
int flags303 local
int flags304 local
int flags305 local
int flags306 local
int flags307 local
int flags308 local
int flags309 local
int flags310 local
int flags311 local
int flags312 local
int flags313 local
int flags314 local
int flags315 local
int flags316 local
int flags317 local
int flags318 local
int flags319 local
int flags320 local
int flags321 local
int flags322 local
int flags323 local
int flags324 local
int flags325 local
int flags326 local
int flags327 local
int flags328 local
int flags329 local
int flags330 local
int flags331 local
int flags332 local
int flags333 local
int flags334 local
int flags335 local
int flags336 local
int flags337 local
int flags338 local
int flags339 local
int flags340 local
int flags341 local
int flags342 local
int flags343 local
int flags344 local
int flags345 local
int flags346 local
int flags347 local
int flags348 local
int flags349 local
int flags350 local
int flags351 local
int flags352 local
int flags353 local
int flags354 local
int flags355 local
int flags356 local
int flags357 local
int flags358 local
int flags359 local
int flags360 local
int flags361 local
int flags362 local
int flags363 local
int flags364 local
int flags365 local
int flags366 local
int flags367 local
int flags368 local
int flags369 local
int flags370 local
int flags371 local
int flags372 local
int flags373 local
int flags374 local
int flags375 local
int flags376 local
int flags377 local
int flags378 local
int flags379 local
int flags380 local
int flags381 local
int flags382 local
int flags383 local
int flags384 local
int flags385 local
int flags386 local
int flags387 local
int flags388 local
int flags389 local
int flags390 local
int flags391 local
int flags392 local
int flags393 local
int flags394 local
int flags395 local
int flags396 local
int flags397 local
int flags398 local
int flags399 local
int flags400 local
int flags401 local
int flags402 local
int flags403 local
int flags404 local
int flags405 local
int flags406 local
int flags407 local
int flags408 local
int flags409 local
int flags410 local
int flags411 local
int flags412 local
int flags413 local
int flags414 local
int flags415 local
int flags416 local
int flags417 local
int flags418 local
int flags419 local
int flags420 local
int flags421 local
int flags422 local
int flags423 local
int flags424 local
int flags425 local
int flags426 local
int flags427 local
int flags428 local
int flags429 local
int flags430 local
int flags431 local
int flags432 local
int flags433 local
int flags434 local
int flags435 local
int flags436 local
int flags437 local
int flags438 local
int flags439 local
int flags440 local
int flags441 local
int flags442 local
int flags443 local
int flags444 local
int flags445 local
int flags446 local
int flags447 local
int flags448 local
int flags449 local
int flags450 local
int flags451 local
int flags452 local
int flags453 local
int flags454 local
int flags455 local
int flags456 local
int flags457 local
int flags458 local
int flags459 local
int flags460 local
int flags461 local
int flags462 local
int flags463 local
int flags464 local
int flags465 local
int flags466 local
int flags467 local
int flags468 local
int flags469 local
int flags470 local
int flags471 local
int flags472 local
int flags473 local
int flags474 local
int flags475 local
int flags476 local
int flags477 local
int flags478 local
int flags479 local
int flags480 local
int flags481 local
int flags482 local
int flags483 local
int flags484 local
int flags485 local
int flags486 local
int flags487 local
int flags488 local
int flags489 local
int flags490 local
int flags491 local
int flags492 local
int flags493 local
int flags494 local
int flags495 local
int flags496 local
int flags497 local
int flags498 local
int flags499 local
int flags500 local
int flags501 local
int flags502 local
int flags503 local
int flags504 local
int flags505 local
int flags506 local
int flags507 local
int flags508 local
int flags509 local
int flags510 local
int flags511 local
int flags512 local
int flags513 local
int flags514 local
int flags515 local
int flags516 local
int flags517 local
int flags518 local
int flags519 local
int flags520 local
int flags521 local
int flags522 local
int flags523 local
int flags524 local
int flags525 local
int flags526 local
int flags527 local
int flags528 local
int flags529 local
int flags530 local
int flags531 local
int flags532 local
int flags533 local
int flags534 local
int flags535 local
int flags536 local
int flags537 local
int flags538 local
int flags539 local
int flags540 local
int flags541 local
int flags542 local
int flags543 local
int flags544 local
int flags545 local
int flags546 local
int flags547 local
int flags548 local
int flags549 local
int flags550 local
int flags551 local
int flags552 local
int flags553 local
int flags554 local
int flags555 local
int flags556 local
int flags557 local
int flags558 local
int flags559 local
int flags560 local
int flags561 local
int flags562 local
int flags563 local
int flags564 local
int flags565 local
int flags566 local
int flags567 local
int flags568 local
int flags569 local
int flags570 local
int flags571 local
int flags572 local
int flags573 local
int flags574 local
int flags575 local
int flags576 local
int flags577 local
int flags578 local
int flags579 local
int flags580 local
int flags581 local
int flags582 local
int flags583 local
int flags584 local
int flags585 local
int flags586 local
int flags587 local
int flags588 local
int flags589 local
int flags590 local
int flags591 local
int flags592 local
int flags593 local
int flags594 local
int flags595 local
int flags596 local
int flags597 local
int flags598 local
int flags599 local
int flags600 local
int flags601 local
int flags602 local
int flags603 local
int flags604 local
int flags605 local
int flags606 local
int flags607 local
int flags608 local
int flags609 local
int flags610 local
int flags611 local
int flags612 local
int flags613 local
int flags614 local
int flags615 local
int flags616 local
int flags617 local
int flags618 local
int flags619 local
int flags620 local
int flags621 local
int flags622 local
int flags623 local
int flags624 local
int flags625 local
int flags626 local
int flags627 local
int flags628 local
int flags629 local
int flags630 local
int flags631 local
int flags632 local
int flags633 local
int flags634 local
int flags635 local
int flags636 local
int flags637 local
int flags638 local
int flags639 local

surface switch linkid=1

sound switchon
sound switchoff

message startup
message activated

end

code
startup:
   sectorCount = GetSectorCount();
   if (sectorCount > 640){
       sectorCount = 640;
   }
Return;

activated:
    if((GetSenderID() == 1) && (toggle == 0)){
        SetWallCel(switch, 1);
        PlaySoundPos(switchon, SurfaceCenter(switch), 1, -1, -1, 0);

        for(i = 0; i < sectorCount; i = i + 1){
            flags0 = GetSectorFlags(i);
            SetSectorFlags(i, 0x2);
        }
        toggle = 1;
        Return;
    }else if((GetSenderID == 1) && (toggle == 1)){
        SetWallCel(switch, 0);
        PlaySoundPos(switchoff, SurfaceCenter(switch), 1, -1, -1, 0);

        toggle = 0;
        for(i = 0; i =< getsectorcount(); i = i + 1){
            SetSectorFlags(i, flags0);
        }
        Return;
    }
Return;

end


Insanely long, I know. Should handle up to 640 sectors. I'll make an explicit sector cog later in case you go over that. Uhm, this may determine if there are any limits on symbols in cog, lol. [http://forums.massassi.net/html/smile.gif]

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come

[This message has been edited by LKOH_SniperWolf (edited August 05, 2004).]
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-05, 10:32 AM #12
Making it run locally will prevent others from noticing the change... so one person can be swimming in underwater sectors and the others won't be. Don't know if that's what you want.

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-05, 11:24 AM #13
Well, I want all of the players to be underwater. I thought that making it local would do that. Unfortunately, the cog didn't work. But it is still progress!

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert

[This message has been edited by Trige (edited August 05, 2004).]
Who made you God to say "I'll take your life from you"?
2004-08-06, 6:08 AM #14
Local means it's run seperately on each computer... so when you press the switch only you see it. I didn't test, and parsec was of no help. And there may be an unknown symbol limit.

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-07, 5:05 PM #15
In that case, I don't want it local. The cog is meant to be used for a trap. Essentially, once the switch is pressed, all of the rooms fill with water (for a set amount of time), everyone drowns, the water goes away.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-08, 1:49 AM #16
Sniper, that cog wont work. Its far too long.


The solution is simple - use a heap. (JK's version of a hash). You can find a few examples on the forum...

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-08, 8:18 AM #17
GBK, I noticed that in your first example, the cog set all of the lighting to 1. I don't know if this change could be done to dynamic or sector lighting, but at this point, either would be of great help to me. I'm sure you could easilly alter the cog to make the lighting change from its current setting to 0 then back to the original setting once the switch is pressed again. I know you said that it was 'buggy', but I would still appreciate it.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-08, 1:46 PM #18
Code:
# 06/2002, 08/2004 gbk
Symbols
	Message Startup
	Message Activated
	Int Mode=0		Local
	Int S=0		Local
	Int I=0			Local
End
Code
	Startup:
		Sleep(1);
		S = Getsectorcount();
		Heapnew(0, S + 1);
		For(I=0;I<=S;I=I+1) Heapset(I, Getsectorlight(I));
		Sleep(1);
		Stop;
	Activated:
		If(!Mode)
		{
			Mode = 1;
			For(I=0;I<=S;I=I+1) Setsectorlight(I, 0, 0);
		}
		Else If(Mode)
		{
			Mode = 0;
			For(I=0;I<=S;I=I+1) Setsectorlight(I, Heapget(I), 0);
		}
		Stop;
End


Its still a hotkey cog, however... :\

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-10, 4:47 AM #19
can someone alter the lighting cog that GBK whipped up so it's not a hotkey cog? Unless GBK wants no one to mess with his coding and wants to do it himself.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-10, 5:31 AM #20
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Trige:
....Unless GBK wants no one to mess with his coding and wants to do it himself.</font>


What on earth gave you that idea? [http://forums.massassi.net/html/tongue.gif]

Code:
# 06/2002, 08/2004 gbk
Symbols
	Message Startup
	Message Activated
	Surface Switch
	Int Mode=0		Local
	Int S=0			Local
	Int I=0			Local
End
Code
	Startup:
		Sleep(1);
		S = Getsectorcount();
		Heapnew(0, S + 1);
		For(I=0;I<=S;I=I+1) Heapset(I, Getsectorlight(I));
		Sleep(1);
		Stop;
	Activated:
		If(!Mode)
		{
			Mode = 1;
			For(I=0;I<=S;I=I+1) Setsectorlight(I, 0, 0);
		}
		Else If(Mode)
		{
			Mode = 0;
			For(I=0;I<=S;I=I+1) Setsectorlight(I, Heapget(I), 0);
		}
		Stop;
End


I dont care if anyone 'messes with my code', just as long as they keep my signature at the top. [http://forums.massassi.net/html/wink.gif]

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-10, 2:57 PM #21
Thanks GBK, works great! But to make it so everyone can see the change in light, I just take out the locals, right?

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-11, 3:51 AM #22
Err, no, everyone will see the change as it is.

------------------
Dear lady, can you hear the wind blow, and did you know
Your stairway lies on the whispering wind.
:wq!
And when the moment is right, I'm gonna fly a kite.
2004-08-11, 11:29 AM #23
Local keyword means that variable is local to the cog, and is not set in the JKL. Local flags means the cog is run locally, on the individual computer (flags=0x240... though this is actually local + unsynced)

So then, what's the max length of a cog, GBK, lol? I haven't seen any information referring a set maximum length, or a maximum number of symbols.

------------------
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2004-08-11, 2:05 PM #24
"Local means it's run seperately on each computer... so when you press the switch only you see it." -LKOH_SniperWolf

"Err, no, everyone will see the change as it is." -GBK

When asking about localizing cogs, I got these two answers, which is why you could understand why I am confused. SO, to clear things up, I want to use a cog in MP and when the cog is used, I want ALL players in the game to see the cog's effect when it is activated. Would the cog have to be local or non-local to do this?


------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-11, 3:10 PM #25
You are getting quite confused indeed.
Both answers were actually correct [http://forums.massassi.net/html/wink.gif]

When the COG is local, then it will run seperately as SniperWolf said. This is done by adding "flags=0x240" before the word "symbols"

As you can see, GBK's cog does NOT have "flags=0x240".

When a VARIABLE is defined as local, for example
Code:
int mode=0   Local
that means that you won't have to put in your own numbers inside the "placed cogs" window (assuming you use jed). This has nothing to do with which computers are affected, merely how the variable is defined.

GBK's cog is a NON-local cog since it doesn't have those flags, thus everyone will see its effects, use that one.

------------------
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2004-08-12, 9:08 AM #26
I've tested the light cog you made in MP GBK, and I see what you mean by it being "buggy". Even though it's local, only a few areas are effected by the cog on other people's computers, but the host experiences the full effect.

Also, if someone could work on the water cog with the heap this time, I'd appreciate it.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?
2004-08-14, 9:28 AM #27
Any luck with the water cog while using heap? If the problem was with all of the sectors being listed, then I will just use GBK's cog as an example to use heap for the water cog. I think it should be easy to do.

------------------
The Editor of bad levels such as:

Battle Ground Oasis The Forgotten Tomb
Office Building Arena
SpacePort Oasis
Wookie Camp
Fade to Black
Thriving Desert
Who made you God to say "I'll take your life from you"?

↑ Up to the top!