PDA

View Full Version : Synchronizing cogs?



ZOOIkes
04-20-2002, 06:05 AM
Is it possible to synchronize two cogs?
I'm using a cog with a rand pulse, k1_lightning.cog, and I want 00_sectordamage.cog to do sector damage only when there is lightning.

How would I do that?

zagibu
04-20-2002, 06:58 AM
hmmm...maybe send start/stop triggers?

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

gbk
04-20-2002, 12:03 PM
Just modify 'k1_lightning.cog' to include the following code:




Pulse:

For(I=0;I<=Getthingcount();I=I+1) If(Getthingtype(I) == 10 && Getthingsector(I) == DAMAGE_SECTOR) Damagething(I, AMOUNT, 0x2, I);



Kill in the caps with the appropriet values.


Bingo, problem solved.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources (http://www.tbns.net/GBK/ol/index.htm).

ZOOIkes
04-20-2002, 01:12 PM
Thanks!

I'll try it right away!

edit: works like a charm.

[This message has been edited by ZOOIkes (edited April 20, 2002).]