Aschbourne_PRC8/_module/nss/hb_usecatapult.nss

19 lines
446 B
Plaintext
Raw Normal View History

2024-06-14 10:48:20 -04:00
/**
hb_usecatapult
OnHeartbeat: While in battle and not engaged in hand-to-hand, return to your
catapult and fire a shot
J.D. Robertson, 2002
*/
#include "i_battle"
void main()
{
if (InBattle() && !GetIsInCombat())
{
object catapult = GetLocalObject(OBJECT_SELF, "MyCatapult");
if (GetIsObjectValid(catapult))
ActionDoCommand(DoPlaceableObjectAction(catapult, PLACEABLE_ACTION_USE));
}
}