The sound works correctly, plays the correct sound at the correct location... but no sparks appear. I can't figure out whats wrong with it.
------------------
And everything under the sun is in tune, but the sun is eclipsed by the moon...
DSettahr's Homepage | Cantina Cloud | Rally NY
Code:
# Jedi Knight Cog Script # # DS_sparks.cog # # This cog will create sparks at a ghost position at a user # defined interval, volume, and max distance # # [DSettahr] # # (C) 2004 by DSettahr. You may use or modify this cog as you like as long as you # provide credit to me. symbols message startup message pulse thing ghostthing float interval=5.0 flex distance=-1 flex volume=1.0 vector ghostposition local int garbage local template sparks=+sparks local sound snd=00ElectrExplo01.wav local end code startup: //Get the position of the ghost object ghostposition = GetThingPos( ghostthing ); //Set the pulse rate from the user defined interval SetPulse( interval ); return; pulse: PlaySoundPos( snd, ghostposition, 1.0, -1, distance, 0 ); CreateThing( sparks, ghostposition ); return; end
------------------
And everything under the sun is in tune, but the sun is eclipsed by the moon...
DSettahr's Homepage | Cantina Cloud | Rally NY