OK, this in theory change all imps to: 50% imps, or 50% agauri. But it doesnt (no imps show up). Why?
Decorate:
Code: Select all
actor DoomImpClassic : DoomImp {}
actor DoomImpReplacer replaces DoomImp
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(1 == (ACS_ExecuteWithResult(802,0,0,0)), "SpClassicI")
TNT1 A 0 A_JumpIf(2 == (ACS_ExecuteWithResult(802,0,0,0)), "SpAgaures")
TNT1 A 0
stop
SpClassicI:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("DoomImpClassic")
stop
SpAgaures:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("Agaures")
stop
}
}
Code: Select all
#library "SCR" // Name of the library
#include "zcommon.acs"
// ####################################################################
global int 1:imp;
// ####################################################################
script 800 (void)
{
print(s:"\cdimp is " , d: imp);
}
// ####################################################################
script 801 ENTER
{
if (imp == 0)
{
imp = (random(1,2));
}
}
script 802 (void)
{
SetResultValue(imp);
}
Help me see where what's wrong with it.