Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick Cleanup of the UpdateNPCAI
#26
DoEvents should only be used to keep a program responsive to user-input. It seems most Mirage goers have it as a bad habit now. It's a relic of the past, at it's best.

You shouldn't call every loop, if you do need to use it.

Try something like this:
Code:
If GetInputState  0 Then DoEvents

If the queue contains one or more new mouse-button or keyboard messages, the return value is nonzero, but if there are no new mouse-button or keyboard messages in the queue, the return value is zero.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)