Skip to main content

Using IssueOrder

Problem

Issuing too many movements may disconnect you from the game server. That's why we implemented internal limit for IssueOrder in the core.
Because of this limit your IssueOrder calls may not go through or "fill the bucket" and cause other scripts not to move when they should, therefore causing a conflict between scripts.

Solution

Try to not issuing orders directly, there are ways to avoid it, for example if you need to move your hero then you may rely on Orbwalker.forcedPosition.
This is the correct way of moving your character in Orbwalker modes and doesn't cause any conflicts with other scripts.

If you absolutely have to use IssueOrder (i.e. for animation cancelling or some other mechanic), then please be sure that you know what you are doing:

  • Have some debug code to count your issue orders per second to see if you are not spamming it.
  • Make sure to always limit it one way or another in your own code, do not rely on the core to do it for you.
    Ideally you should execute no more than 1 IssueOrder per desired action. Never spam it mindlessly to achieve what you want.
  • Some confirmation code to track if your issue order went through and resulted in desired action may be helpful to detect successful actions and prevent spamming.