For a modern d20 mod I need an instant feat, which will make the user take aim with a ranged weapon and attack after a delay (if still line of sight to the target) with an attack bonus. I plan to make the feat freeze the user in place while aiming (maybe even lower AC).
any help is appreciated!
targetted Instant feat - so for example x3_pl_tool08, set to 1 use per rest.
object oPC = OBJECT_SELF;
object oTarget = GetSpellTargetObject();
location lTarget = GetSpellTargetLocation();
float cooldown: 30.0; // Cooldown of ability
float freezetime = 8.0; // delay before attacking
int modifier = 5; // Attack bonus
int feat = xxxx;
freezetime = 6.0; // if oPC has another feat, then shorter freezetime
if( GetIsValidTarget(oTarget) && GetIsEnemy(oTarget) && LineOfSightObject(oPC, oTarget) == TRUE)
// code. How to freeze oPC for freezetime seconds and then attack with a bonus IF there still is line of sight? maybe even adjust oPC facing during freeze time to continue facing oTarget if target is moving…?
// custom function which increments feat uses depending on cooldown
//already made and works for other feats (at work so can’t post that code)
Any help is greatly appreciated!