Jump to content

Functions


The Cartooners

Recommended Posts

Call it the same as you would any other function. There isn't anything different or isolated about the sections in the lua file. It looks that way because it's well organized. Take care that the Builder doesn't modify the line of code that calls your author function. To prevent this, I usually move the entire event to the Author Functions section. Assuming the Builder doesn't overwrite the method call, here's an example:

 

In the Author Functions section:

function SayHi()
Wherigo.MessageBox{Text="Hi"}
end

 

In the Wherigo event section (or somewhere else in my Author Functions section):

function zoneMyZone:OnEnter()
-- #GroupDescription=My Zone --
-- #Comment=My Zone Comment --
SayHi()
end

Link to comment

Call it the same as you would any other function. There isn't anything different or isolated about the sections in the lua file. It looks that way because it's well organized. Take care that the Builder doesn't modify the line of code that calls your author function. To prevent this, I usually move the entire event to the Author Functions section. Assuming the Builder doesn't overwrite the method call, here's an example:

 

In the Author Functions section:

function SayHi()
Wherigo.MessageBox{Text="Hi"}
end

 

In the Wherigo event section (or somewhere else in my Author Functions section):

function zoneMyZone:OnEnter()
-- #GroupDescription=My Zone --
-- #Comment=My Zone Comment --
SayHi()
end

 

Thanks for the reply. Is there a way of doing this through the builder or does it have to be hand cranked.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...