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!