Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-03-18, 12:36 PM   #1
candrid
Premium Member
 
candrid's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 61
Red face Creating a Development Tutorial

Hey Friends!

So many people help me understand what some of the development things mean. I decided I would heavily comment code and try to explain what I am doing/meaning but I did not want to stop there. I am going to make a tutorial on creation. Below is some example code, showing this idea, anything you want to see?

Code:
local addonName, addonData = ... -- This line means you are setting two local variables, addonName and addonData to equal multiple things.

-- Configuration
local camSpeed = 0.4  -- The speed of the rotation, higher is faster
local returnView = true -- This makes the camera return to its original position when you return from AFK.

local isAFK = false -- When this is default false the player is active, we use the trigger to switch it on.
local smoothCamera -- Creates the Variable "smoothCamera."

-- Functions (the things the addon does)
local function beginMovement (speed)
	smoothCamera = GetCVar("cameraSmoothStyle") -- the CVar "cameraSmoothStyle" determines the style of the camera.
	if (returnView) then -- An if statement is like a true and false, a yes or no.
		SaveView(5)
	end -- Ends the if statement.

Please feel free to correct me in errors.

Thanks in advance!

Last edited by candrid : 08-03-18 at 03:44 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Creating a Development Tutorial


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off