viewtopic.php?t=55073&hilit=Zscript+A_P ... rt=240#top
Basically I'm creating a NetworkProcess for a custom keypress and if you are standing in front of a Sygil (custom Actor class), stuff happens. Here is the code I have tried to adapt from that thread
Code: Select all
override void NetworkProcess(ConsoleEvent e) {
if (e.Name == "pray") {
double useDist = 64.f,
vDist = 35.f;
// Replacement for A_PickActor
FTranslatedLineTarget t;
players[0].mo.AimLineAttack(
players[0].mo.Angle,
useDist,
t,
vDist,
ALF_FORCENOSMART | ALF_CHECKCONVERSATION | ALF_PORTALRESTRICT
);
bool isSygil = (t.linetarget!= null && t.linetarget is "Sygil");
if(isSygil){
// do stuff
}
}
}