OK, here's a Client/Server cog i've written, I haven't had much experiance with C/S, I made this cog by looking at other cogs. Now the problem is that nothing happens when I activate the switch, could someone point out what i'm doing wrong?
Server cog:
Client cog:
Server cog:
Code:
# Jedi Knight Cog Script # # gravserver.cog # # This will send a trigger to the client grav cog # # # [E3 - 15/8/2001] # # --------------- symbols thing switch message activated end # ======================================================================================== code activated: SendTrigger(-1, 386753, 0, 0, 0, 0); Return; end
Client cog:
Code:
# Jedi Knight Cog Script # # gravclient.cog # # Adapted from Zero's cog, this clients/server cog should work in # multiplayer and effect everyone in the game (unlike the original # which only effected the host). # # [E3 - 15/08/2001] symbols message trigger flex number1 local sound gravalarm end # ======================================================================================== code trigger: if(GetSenderID != 386753) Return; number1 = GetGravity(); PlaySoundGlobal(gravalarm, 1.0, 0.0, 0x10000); if(number1 == 0) { print("Gravity Level: NORMAL"); SetGravity(4.0); number1 == 4; return; } if(number1 == 4) { print("Gravity Level: HIGH"); SetGravity(7.0); number1 == 7; return; } if(number1 == 7) { print("Gravity Level: LOW"); SetGravity(1.0); number1 == 1; return; } if(number1 == 1) { print("WARNING GRAVITY LEVEL 0: If You Jump... You Will Not Come Down!"); SetGravity(0.0); number1 == 0; return; } return; endCode:[Edit]hahahaha - the post has been here for over 3 hours and i've only just noticed that i forgot to add the code hehehe[/edit] [This message has been edited by Electro (edited March 03, 2002).]
Generating Electro Vibes™ for the masses on Massassi
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!