ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   n00b in LUA need help :) (https://www.esoui.com/forums/showthread.php?t=7166)

vvarderen 06/22/17 01:54 PM

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!

Rhyono 06/22/17 02:11 PM

Does this help?

Letho 06/22/17 05:09 PM

I must admit I dont even understand what you are trying to do. Could you describe it without code?

Rhyono 06/22/17 05:23 PM

As time passes he wants something to become more and more transparent until it disappears.

votan 06/23/17 01:39 AM

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()

vvarderen 06/24/17 02:35 AM

thank all for your help :)


All times are GMT -6. The time now is 02:43 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI