I made an actor COG and a template entry, but for some reason it refuses to associate the actor COG with the entry...can you take a look at this and tell me if there are any problems you see? what would be causing the problem?
# DESC: AT-ST with two pilots
# BBOX: -0.1616239 -0.2391249 -0.45412 0.1605707 0.2508638 0.2235963
atstnhm _humanactor thingflags=0x400 model3d=at.3do size=0.300000 movesize=0.300000 puppet=atst.pup soundclass=atst.snd cog=actor_atst44.cog mass=0.000000 maxvel=0.400000 weapon=+lasercannon health=800.00 maxhealth=800.00 maxthrust=0.30 maxrotthrust=10.00 typeflags=0x100 fireoffset=(0.000000/0.200000/0.000000) aiclass=atstdefault.ai
here is the COG:
# Jedi Knight Cog Script
#
# ACTOR_ATST44.COG
#
#
# Actor COG for Standard ATST
# creates two drivers on destruction
# Resitances to certain types of damage
#
# ========================================================================================
symbols
message killed
message skill
message damaged
template pilot=atstdriver local
template pilot2=atstdriver local
template explosion=+atst_exp local
thing newThing local
flex rval local
flex damageType local
flex damageAmount local
flex totalDamage local
int player local
end
# ========================================================================================
code
killed:
print("test good");
rval = Rand();
if (rval < 0.45)
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
}
else if (rval < 0.60)
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
}
else
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
DamageThing(newThing, 1000.0, 0x2, -1);
}
return;
# ........................................................................................
skill:
ReturnEx(-1);
return;
# ........................................................................................
damaged:
damageAmount = GetParam(0);
damageType = GetParam(1);
totalDamage = damageAmount;
if(GetParam(1) == 1)
{
totalDamage = (totalDamage / 1000);
}
else if(GetParam(1) == 2)
{
totalDamage = (totalDamage / 100);
}
else if(GetParam(1) == 16)
{
totalDamage = (totalDamage / 1000);
}
ReturnEx(totalDamage);
return;
end
# DESC: AT-ST with two pilots
# BBOX: -0.1616239 -0.2391249 -0.45412 0.1605707 0.2508638 0.2235963
atstnhm _humanactor thingflags=0x400 model3d=at.3do size=0.300000 movesize=0.300000 puppet=atst.pup soundclass=atst.snd cog=actor_atst44.cog mass=0.000000 maxvel=0.400000 weapon=+lasercannon health=800.00 maxhealth=800.00 maxthrust=0.30 maxrotthrust=10.00 typeflags=0x100 fireoffset=(0.000000/0.200000/0.000000) aiclass=atstdefault.ai
here is the COG:
# Jedi Knight Cog Script
#
# ACTOR_ATST44.COG
#
#
# Actor COG for Standard ATST
# creates two drivers on destruction
# Resitances to certain types of damage
#
# ========================================================================================
symbols
message killed
message skill
message damaged
template pilot=atstdriver local
template pilot2=atstdriver local
template explosion=+atst_exp local
thing newThing local
flex rval local
flex damageType local
flex damageAmount local
flex totalDamage local
int player local
end
# ========================================================================================
code
killed:
print("test good");
rval = Rand();
if (rval < 0.45)
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
}
else if (rval < 0.60)
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
}
else
{
newThing = CreateThing(explosion, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
newThing = CreateThing(pilot, GetSenderRef());
DamageThing(newThing, 1000.0, 0x2, -1);
}
return;
# ........................................................................................
skill:
ReturnEx(-1);
return;
# ........................................................................................
damaged:
damageAmount = GetParam(0);
damageType = GetParam(1);
totalDamage = damageAmount;
if(GetParam(1) == 1)
{
totalDamage = (totalDamage / 1000);
}
else if(GetParam(1) == 2)
{
totalDamage = (totalDamage / 100);
}
else if(GetParam(1) == 16)
{
totalDamage = (totalDamage / 1000);
}
ReturnEx(totalDamage);
return;
end