Test actors:
Code: Select all
ACTOR IntImp : DoomImp replaces DoomImp
{
States
{
Missile:
TROO EF 8 A_FaceTarget
TROO G 3 A_GiveToTarget("TIDChanger") //Test line to be sure that target's TID different from 0. It changes player TID but Thing_ProjectileIntercept still not work
TROO G 3 ACS_NamedExecute("InterceptionStrike",0)
Goto See
}
}
ACTOR TIDChanger: CustomInventory
{
+INVENTORY.ALWAYSPICKUP
Inventory.MaxAmount 0
States
{
Pickup:
TNT1 A 0 Thing_ChangeTid(0,FindUniqueTid(0,0))
Stop
}
}
ACTOR IntCacoBall : CacodemonBall
{
SpawnID 666
}
Code: Select all
#include "zcommon.acs"
Script "InterceptionStrike" (void)
{
int TargetTid=GetActorProperty(0,APROP_TargetTID); //Here it should receive shooter's target TID
int InterceptTid=Thing_ChangeTID(TargetTid,UniqueTID(0,0)); //Here it should change its target's TID to an unique one
Thing_ProjectileIntercept(0,666,255,InterceptTid,0); //Now projectile should be fired but it doesn't
PlaySound(0,"brain/pain"); //Test line
Delay(35*5); //Test line, time gap
Thing_ChangeTID(InterceptTid,TargetTid);
}