It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
How do I define the PC in a module heartbeat script? I've tried a few different ones like GetFirstPC (); but nothing has worked so far. BTW, this is a single player mod that I am working on.
No posts in this topic were marked as the solution yet. If you can help, add your reply
Never mind. GetFirstPC() does work in a heartbeat event. Apparently, there was something wrong somewhere else in my script.
avatar
jerrus147: Never mind. GetFirstPC() does work in a heartbeat event. Apparently, there was something wrong somewhere else in my script.
On heartbeat script are quite the CPU devourer, although by now pc are so powerful in comparison to when this game was released that you may not even notice the strain, it's still not a particularly efficient methods to do scripts

On heartbeat mean checking constantly, and it should be used only when no other method is sufficient, like making a special aura of some kind, or make the engine create a special area effect where checking every "turn" isn't adequate for game play reason, like applying a penalty to whoever enter a certain zone

Maybe if you are more specific the community can help, or give suggestions