Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Blowing Fan Cog
Blowing Fan Cog
2002-11-09, 2:42 AM #1
I have a blowing fan MP cog, which I borrowed from JK's cogs (I think I used the Nar Shaddaa CTF one) and modified for use in my level (specifically, my fan is on all the time, while the original cog's fan stops, so I took out the unnecessary code needed to stop it). It originally was server side, and appeared to work fine. But when a client joined, he/she could only see the fan spinning, and was not blown by it, nor could he/she hear the fan sfx.

I added flags=0x240, hoping it would fix it, but I had the same problems.

The following is the full code of the cog. Could someone please tell me what I am doing wrong?!? ty.
Code:
# Jedi Knight Cog Script
#
# WH_BLOWING_FAN.COG
#
# Blows the player through some pipes.
#
# [YB] Modified by [MZZT]
#
# Original c3_fanspuzzle.cog
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
#
# This Cog is Not supported by LucasArts Entertainment Co.

flags=0x240

symbols

sector      hz1                              nolink,desc=horiz1
sector      hz2                              nolink,desc=horiz2
sector      hz3                              nolink,desc=horiz3
sector      dn1                              nolink,desc=down1
sector      dn2                              nolink,desc=down2
sector      up1                              nolink,desc=up1
sector      up2                              nolink,desc=up2
thing       ghost_fan                        nolink,desc=ghost_fan

vector      hzspeed                          local
vector      dnspeed                          local
vector      upspeed                          local
thing       the_fan                          local
int         the_fan_snd                      local
int         player                           local

sound       fan_snd=BigFan01.WAV             local

message     startup

end

# ========================================================================================

code

startup:
   player = GetLocalPlayerThing();

   // SERVER ONLY startup:
   if(IsServer() || !IsMulti())
   {
      hzspeed = '0.0 8.0 0.0';
      dnspeed = '0.0 0.0 -8.0';
      upspeed = '0.0 0.0 8.0';
      the_fan = ghost_fan;
      the_fan_snd = PlaySoundThing(fan_snd, the_fan, 1.0, 14.0, 18.0, 0x41);
      call apply_thrusts;
   }

   Return;

# ........................................................................................

apply_thrusts:
   SectorThrust(hz1, hzspeed, 1.0);
   SectorThrust(hz2, hzspeed, 1.0);
   SectorThrust(hz3, hzspeed, 1.0);
   SectorThrust(dn1, dnspeed, 1.0);
   SectorThrust(dn2, dnspeed, 1.0);
   SectorThrust(up1, upspeed, 1.0);
   SectorThrust(up2, upspeed, 1.0);

   Return;

end

[There... now it's easier for mere mortals to read.] [EVIL BAD URL TYPO]
------------------
The Mega-ZZTer's Gaming Haven!

New and improved! With a brand new chocolately taste!

[This message has been edited by The_Mega_ZZTer (edited November 09, 2002).]

2002-11-09, 6:17 AM #2
Delete that first if/then and it should work fine w/o local cog. That first line makes it only work in SP or server only. [http://forums.massassi.net/html/wink.gif] Thanks for using code tags. Apprecate it.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-09, 7:26 AM #3
/me smacks his head

DOH!

Why didn't I see that?

Thanks.

------------------
The Mega-ZZTer's Gaming Haven!

New and improved! With a brand new chocolately taste!

↑ Up to the top!