Code: Select all
class vss : pistol
{
bool silencer;
default
{
Weapon.SelectionOrder 1;
Weapon.SlotNumber 9;
+WEAPON.NOALERT;
}
override void postbeginplay()
{
silencer = false;
super.postbeginplay();
}
states
{
altfire:
pisg c 66 {
if (invoker.silencer = false) {invoker.silencer = true;}
if (invoker.silencer = true) {invoker.silencer = false;}
}
goto ready;
}
}
class suspiciousImp : doomimp
{
int suspicions;
override void postbeginplay()
{
suspicions = 0;
super.postbeginplay();
}
override int TakeSpecialDamage(Actor inflictor, Actor source, int damage, Name damagetype)
{
let silencerchecker = source.FindInventory("vss");
if (silencerchecker.silencer == true)//line 102
{
super.TakeSpecialDamage(inflictor, source, damage, damagetype);
target = null;
return resolvestate("where_hitman");
}
super.TakeSpecialDamage(inflictor, source, damage, damagetype);
}
So, I do something wrong or weapon/inventory variables cant be checked from other actors?Script error, "monsters.pk3:zscript.dec" line 102:
Unknown identifier 'silencer'