Jump to content

Home

HeartBeat fastening?


newszi

Recommended Posts

Is that possible, by any means, that the onHeartBeat scripst re-execution delay can be lowered? So the re-execution can be fastened?

 

As far as I am aware the heartbeat event of an object is hardcoded to run roughly every 3 seconds at the Default AI level, and I don't think that can be changed.

 

If it's a creature running the event you could probably, in theory, force it to run another heartbeat halfway between "ordinary" heartbeats, by adding something like this in the heartbeat script:

   if (!GetLocalBoolean(OBJECT_SELF, 140)) {
       DelayCommand(1.5, ForceHeartbeat(OBJECT_SELF));
       SetLocalBoolean(OBJECT_SELF, 140, TRUE);
   }
   else {
       SetLocalBoolean(OBJECT_SELF, 140, FALSE);
   }

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...