Greetings.
Below is a cog Saber Master helped write. I added a line where it changes the Material cell for a console 3do. Well, the problem is that it only changes the material cel on the server. Any ideas would be appreciated. Thanks.
[This message has been edited by GBK (edited January 25, 2003).]
Below is a cog Saber Master helped write. I added a line where it changes the Material cell for a console 3do. Well, the problem is that it only changes the material cel on the server. Any ideas would be appreciated. Thanks.
Code:
# serverclient.cog # # Server side cog that affects all clients. When the switch or console is activated, # the server will create things that appear on all client computers. These things # will then by kept in sync by their class cogs. # # [SM + GD] #==============================================================# symbols surface switch thing console mask=0xfff thing pos0 nolink thing pos1 nolink thing pos2 nolink thing pos3 nolink thing pos4 nolink thing pos5 nolink int i local int x local int locked=0 local material mat flex rate=0.01 flex delay=61 template thingTpl sound on_snd=set_hi2.wav sound off_snd=lgclick1.wav message activated message damaged end #==============================================================# code #------------------------------------------------------ damaged: activated: if(locked == 1) Return; locked = 1; SetWallCel(switch, 1); SetMaterialCel(mat, 1); PlaySoundPos(on_snd, GetSurfaceCenter(switch), 1, 5, 10, 0); for(i = 0; i <= 5; i = i + 1) { SetThingParent(CreateThing(thingTpl, pos0), GetSourceRef()); Sleep(rate); } Sleep(delay); SetWallCel(switch, 0); SetMaterialCel(mat, 0); PlaySoundPos(off_snd, GetSurfaceCenter(switch), 1, 5, 10, 0); locked = 0; Return; #------------------------------------------------------ end
[This message has been edited by GBK (edited January 25, 2003).]