Page 1 of 1

onLoad or onOpen or something like that

Posted: Sun Apr 10, 2011 10:17 pm
by OrigSyn
I was reading an article either here or on the documentation site and I remember clearly reading something that sounded like this: "you can get this to work when the campaign loads using the <insert function here>," but I cannot find that article, nor a referenced function in the documentation.

I thought it was something like onLoad or onOpen. I was hoping to get it to open several frames in my players' screens. Right now, I've got a macro that does that, but they still have to press it. Just trying to make things easier for them.

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 12:26 am
by mfrizzell
What your looking for is onCampaignLoad. Unfortunately I can't find it in the wiki, so I can't point you to it.

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 1:29 am
by Azhrei
Searching the wiki found it. It's right here: onCampaignLoad.

But without knowing what it was it would've been tough to find. :|

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 3:14 am
by wolph42
Azhrei wrote:Searching the wiki found it. It's right here: onCampaignLoad.

But without knowing what it was it would've been tough to find. :|
man that thing is really hidden. Shouldn't it also just be in the 'functions' list?

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 3:27 am
by Azhrei
wolph42 wrote:
Azhrei wrote:Searching the wiki found it. It's right here: onCampaignLoad.

But without knowing what it was it would've been tough to find. :|
man that thing is really hidden. Shouldn't it also just be in the 'functions' list?
It's not a function, though. Unless you want to create some kind of special category for it. Maybe check to see where Joe put the onTokenMoved macros?

Or if he didn't put them in a particular category, then create a new one for auto-invoked macros or some other name...

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 4:38 am
by wolph42
True, its not a 'function' still I (and I suppose others) either search or wade through the functions list looking for what they need. You could also maybe go for an index or glossary, but that would be more then just a small addition.

Re: onLoad or onOpen or something like that

Posted: Mon Apr 11, 2011 7:53 am
by jfrazierjr
Yea... I would suggest a top level item named "MapTool 'Events'" or something like that. All of the on* functions should go into there with examples(onChangeSelection, etc)