Posted by Sinclair on March 14, 1998 at 21:29:54:
ok, I'm...my text is italicized strange, well, I am making The Empire Strikes Back for Mysteries of the Sith and have made the Darth Vader AI and COG file but am having a problem. Vader will fight you in a saber fight to the end but will use no Force Powers what so ever.
Any help would be appreciated, I've included the cog below.
# Jedi Knight Cog Script
#
# vader.COG
#
# DARK JEDI Script - Darth Vader
#
# [DS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
message startup
message newplayer
message damaged
message killed
message user0
message pulse
message skill
thing darkjedi mask=0xfff
int player local
int victim local
int forcepower local
int forcepulse local
int count local
int limit local
int dummy local
int damageamount
material tip_mat=saberred0.mat local
material side_mat=saberred1.mat local
template tpl_wall=+ssparks_wall local
template tpl_blood=+ssparks_blood local
template tpl_saber=+ssparks_saber local
flex autoAimFOV=10 local
flex autoAimMaxDist=5 local
# FORCE BLINDING
template cone_tpl=+force_blind local
sound blindingSound=ForceBlind01.WAV local
int effectHandle=-1 local
end
# ========================================================================================
code
startup:
newplayer:
jkSetSaberInfo(darkjedi, side_mat, tip_mat, 0.003, 0.001, 0.101, tpl_wall, tpl_blood, tpl_saber);
jkSetFlags(darkjedi, 0x5);
player = GetLocalPlayerThing();
DamageThing(darkjedi, damageamount, 0x02, player);
Return;
# ........................................................................................
killed:
jkSetFlags(darkjedi, 0x8);
if(effectHandle!=-1)
{
freeColorEffect(effectHandle);
effectHandle = -1;
AddDynamicAdd(victim, 180, 260, 230);
}
ClearActorFlags(victim, 0x800);
Return;
# ........................................................................................
damaged:
damage = GetParam(0);
damageType = GetParam(1);
if(damageType & 1) // IMPACT
damage = damage;
else
if(damageType & 2) // ENERGY
damage = damage;
else
if(damageType & 4) // FIRE
damage = damage;
else
if(damageType & 8) // FORCE
damage = damage;
else
if(damageType & 16) // SABER
damage = damage;
ReturnEx(damage);
Return;
# ........................................................................................
pulse:
if(forcepulse == 7)
{
if(effectHandle!=-1)
{
freeColorEffect(effectHandle);
effectHandle = -1;
AddDynamicAdd(victim, 180, 260, 230);
}
ClearActorFlags(victim, 0x800);
SetPulse(0);
}
Return;
# ........................................................................................
skill:
bin = GetParam(0);
if(bin == 31) // Force Grip
{
ReturnEx(10);
Return;
}
else
if(bin == 34) // Deadly Sight
{
ReturnEx(5);
Return;
}
else
if(bin == 30) // Force Throw
{
ReturnEx(10);
Return;
}
ReturnEx(-1);
Return;
end