I have this cog and it works fine except I want it to play the same sound at 2 ghost positions, I had "PlaySoundThing(sound0[Rand()*4], lightthing2, Rand()*0.8+0.2, 10.0, -1, 0x10080);" after the existing one, but they didn't play the same sounds (which I didn't think it would work, and I was right). But I can't figure out how to make the same sound play at the two ghosts. Any ideas?
------------------
Last week I cudn't evn spel grajuat, but now I is one.
*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "STROOPER WUZ 'ERE!!!"
[This message has been edited by Stormtrooper (edited December 14, 2002).]
Code:
symbols
thing lightthing desc=thing_to_light
thing lightthing2 desc=thing_to_light2
sound sound0 desc=lightning_sound
sound sound1 desc=lightning_sound1
sound sound2 desc=lightning_sound2
sound sound3 desc=lightning_sound3
flex lowlight=0.1 desc=off_light_val
flex highlight=0.6 desc=on_light_val
flex offmax=0.5 desc=max_off_interval
flex onmax=1.0 desc=max_on_interval
message startup
end
# COG Section
code
startup:
while(1) {
thinglight(lightthing, lowlight, 0.0);
thinglight(lightthing2, lowlight, 0.0);
sleep(rand()*offmax);
thinglight(lightthing, highlight, 0.0);
thinglight(lightthing2, highlight, 0.0);
PlaySoundThing(sound0[Rand()*4], lightthing, Rand()*0.8+0.2, 10.0, -1, 0x10080);
sleep(rand()*onmax);
}
stop;
end------------------
Last week I cudn't evn spel grajuat, but now I is one.
*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "STROOPER WUZ 'ERE!!!"
[This message has been edited by Stormtrooper (edited December 14, 2002).]