Delegates

tvisarl
28 Jul 2016, 06:38

May I ask what are "Delegates"?

Thanks,
Thierry


Pertex
28 Jul 2016, 06:58

The search function of the forum returns several threads. One of them: http://textadventures.co.uk/forum/samples/topic/3623/delegates-vs-functions


hegemonkhan
28 Jul 2016, 07:16

Delegates (if I understand them) basically alows you to, add Arguments/Parameters and/or be able to return a value, to your Object's Script Attributes / Verbs. So, Objects+Script Attributes+Delegates have the same (and more) functionality as Functions/Commands have. Think of Delegates as like "prototypes" (if you know programming terminology) for your Object's Script Attributes/Verbs, instead of for your Functions.

here's some doc links (though Jay's post as a link in Pertex' post above, probably does a better job explaining them):

http://docs.textadventures.co.uk/quest/types/using_delegates.html
http://docs.textadventures.co.uk/quest/elements/delegate.html
http://docs.textadventures.co.uk/quest/functions/rundelegatefunction.html
etc etc etc