Quantcast n00b in LUA need help :) - ESOUI
Thread Tools Display Modes
06/22/17, 01:54 PM   #1
vvarderen
 
vvarderen's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 20
n00b in LUA need help :)

Hi! It's me

How i make this timer for :

if (time == 1) then
myTexture:SetHidden(false)
myTexture:SetAlpha(0.9)
if (time == 2) then
myTexture:SetAlpha(0.6)
if (time == 3) then
myTexture:SetAlpha(0.3)
if (time == 4) then
myTexture:SetAlpha(0.1)
if (time == 5) then
myTexture:SetHidden(true)
end

time == X x are secondes

Thank you!
__________________
"ALMSIVI"
  Reply With Quote
06/22/17, 02:11 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 442
Does this help?
  Reply With Quote
06/22/17, 05:09 PM   #3
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 198
I must admit I dont even understand what you are trying to do. Could you describe it without code?
  Reply With Quote
06/22/17, 05:23 PM   #4
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 442
As time passes he wants something to become more and more transparent until it disappears.
  Reply With Quote
06/23/17, 01:39 AM   #5
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 460
Hi.

You have to look at the ANIM_MANAGER:

There are fade animations already. You could register to OnStop of the timeline to do SetHidden.

Or you can do nearly everything on your own. Like this:
Lua Code:
  1. local timeline = ANIMATION_MANAGER:CreateTimelineFromVirtual("ZO_TreeOpenAnimation")
  2. local anim = timeline:GetFirstAnimation()
  3. anim:SetUpdateFunction( function(animation, progress) d(progress) end)
  4. anim:SetEasingFunction(ZO_EaseOutQuadratic)

You may do a text search for ANIM_MANAGER or GetAnimationManager()
__________________
@votan73 (EU - megaserver)
  Reply With Quote
06/24/17, 02:35 AM   #6
vvarderen
 
vvarderen's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 20
thank all for your help
__________________
"ALMSIVI"
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » n00b in LUA need help :)

Thread Tools
Display Modes

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