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 → Trap Cog Help
Trap Cog Help
2001-08-11, 4:48 PM #1
Heres the Cog, instead of stormtrooper laser bolts, i need it to fire concussion bullets that explode on contact. this is a cog from teh nar shadda loading terminal dont change anything but make it fire conc bullets pls!

# Jedi Knight Cog Script
#
# M2_turrettrap.cog
#
# Multiplayer turrets activated by switch.
#
# This will generate a series of 3 laser bursts per 'round' when
# the switch is activated.
# The trap resets in 'delay' seconds afterwards.
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================

symbols

message activate

surface switch desc=switch

thing turret1 nolink,desc=turret1
thing turret2 nolink,desc=turret2
thing turret3 nolink,desc=turret3
thing turret4 nolink,desc=turret4
thing ghost1 nolink,desc=ghost1
thing ghost2 nolink,desc=ghost2
thing ghost3 nolink,desc=ghost3
thing ghost4 nolink,desc=ghost4

int rounds=5 desc=rounds

float rate=0.33 desc=rate
float delay=2.0 desc=delay
float movespeed=2.0
float autoAimXFOV=90
float autoAimZFOV=180

int firing=0 local
int cur_round=0 local

template projectile=+concbullet local

sound fireSound=turret-1.wav local
sound on_snd=set_hi2.wav local
sound off_snd=lgclick1.wav local

end

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

code

activate:
if(firing == 1) Return;

firing = 1;
SetWallCel(switch, 1);
PlaySoundPos(on_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
MoveToFrame(turret1, 1, movespeed);
MoveToFrame(turret2, 1, movespeed);
MoveToFrame(turret3, 1, movespeed);
MoveToFrame(turret4, 1, movespeed);

cur_round = 0;
while(cur_round < rounds)
{
FireProjectile(ghost1, projectile, fireSound, -1, '0 0 0', '0 0 0', 1.0, 0x60, autoAimXFOV, autoAimZFOV);
Sleep(rate);
FireProjectile(ghost2, projectile, fireSound, -1, '0 0 0', '0 0 0', 1.0, 0x60, autoAimXFOV, autoAimZFOV);
Sleep(rate);
FireProjectile(ghost3, projectile, fireSound, -1, '0 0 0', '0 0 0', 1.0, 0x60, autoAimXFOV, autoAimZFOV);
Sleep(rate);
FireProjectile(ghost4, projectile, fireSound, -1, '0 0 0', '0 0 0', 1.0, 0x60, autoAimXFOV, autoAimZFOV);
Sleep(rate);
cur_round = cur_round + 1;
}

Sleep(delay);
dummy = SetWallCel(switch, 0);
dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
firing = 0;
MoveToFrame(turret1, 0, movespeed);
MoveToFrame(turret2, 0, movespeed);
MoveToFrame(turret3, 0, movespeed);
MoveToFrame(turret4, 0, movespeed);
Stop;

end
2001-08-12, 7:56 AM #2
Erm... That should already fire conc bullets...

------------------
Generating Electro Vibes™ for the masses on Massassi
Go To: EL3CTROPROSE or DEEPMATRIX
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
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*
&lt;EL3CTRO&gt; EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
2001-08-12, 8:07 AM #3
well it should, but when i try to click the switch, nothing happens, its like the cog isnt even there, so whats wrong? pls tell me

------------------
N e 0
The Chosen One
2001-08-13, 5:57 AM #4
Make sure that you have set it up properly in the level. It sounds like one of the frames of the turrets is wrong, or the turrets dont have the right THINGFLAGS. Copy the thing flags from the ones in the Nar Shaddaa loading terminal. If u edited the cog other than the template, try just using the original cog, just take out "local" on the template line and set it thru the JED or JKEDIT cog window to +concbullet.

↑ Up to the top!