ThinkerFunctions

From Valve Developer Community
< Dota 2 Workshop Tools‎ | Scripting
Revision as of 00:04, 7 August 2014 by VDCBot (talk | contribs) (Dota 2 Workshop Tools docs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Thinkers can be created at any time using SetThink on a function. It is possible to have multiple thinkers running at the same time but does require the thinkers to be named so as not to overlap in the same think slot.

Usage

SetThink( "ThinkerFunction", self, "thinkerNameString", 1 )


  • ThinkerFunction - The name of the function.
  • thinkerNameString - The name of the thinker. Use this when handling multiple thinkers.
  • 1 - Integer specifying a delay in seconds before the thinker starts to think. Not required.

Returning a nil will unregister the thinker and stop it. Returning an integer sets the next think time.