Using Delegates

From QuestWiki
Jump to: navigation, search

It is easy to create a script attribute to run at a particular point in the game, but what if you want to create a script attribute that returns a value, or accepts particular parameters? It would look a lot like a function. The answer is to use delegates.

First you need to define the delegate, using a delegate XML tag. This accepts the same attributes as the function tag, so you can specify parameters and/or a return value type.

Now you can simply use the delegate name as an attribute type name.

Personal tools
Namespaces
Variants
Actions
Navigation
Quest Documentation
Toolbox