Thread Tools Display Modes
04/27/15, 11:56 AM   #1
JohnnyKing94
 
JohnnyKing94's Avatar
Join Date: Mar 2015
Posts: 45
Animated Announce

I'm want to reproduce the animated announcement shown on the center of the screen when a gate is open or an elder scrolls has been stolen and before trying i want to ask if anyone of you tried to do that or if is possible to do that (adding own music sound)? some events triggered by a function that shows a yellow (purple etc) phrase on the middle of the screen... it's something that i desire and would be cool
  Reply With Quote
04/27/15, 12:04 PM   #2
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Haven't used it yet, but I'd say you're looking for CENTER_SCREEN_ANNOUNCE:AddMessage()

The stock code is here: http://esodata.uesp.net/100010/src/i...ce/luadir.html
  Reply With Quote
04/27/15, 12:12 PM   #3
JohnnyKing94
 
JohnnyKing94's Avatar
Join Date: Mar 2015
Posts: 45
Originally Posted by Randactyl View Post
Haven't used it yet, but I'd say you're looking for CENTER_SCREEN_ANNOUNCE:AddMessage()

The stock code is here: http://esodata.uesp.net/100010/src/i...ce/luadir.html
So is it possible to reproduce a similar code to the original one?
  Reply With Quote
04/27/15, 12:13 PM   #4
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
only who using addon will see it
  Reply With Quote
04/27/15, 12:22 PM   #5
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Yeah, I do it in one of my addons.

Look at a nice post of Garkin who explain this (after the last quote) :
http://www.esoui.com/forums/showpost...93&postcount=4

Personnally, it's :

Lua Code:
  1. CENTER_SCREEN_ANNOUNCE:AddMessage(999, CSA_EVENT_LARGE_TEXT, SOUNDS.CHAMPION_POINTS_COMMITTED, SuperStar.lang.CSARespecDone, nil, nil, nil, nil, nil)
  Reply With Quote
04/27/15, 01:07 PM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Ayantir View Post
Yeah, I do it in one of my addons.

Look at a nice post of Garkin who explain this (after the last quote) :
http://www.esoui.com/forums/showpost...93&postcount=4

Personnally, it's :

Lua Code:
  1. CENTER_SCREEN_ANNOUNCE:AddMessage(999, CSA_EVENT_LARGE_TEXT, SOUNDS.CHAMPION_POINTS_COMMITTED, SuperStar.lang.CSARespecDone, nil, nil, nil, nil, nil)
Function now have another two optional arguments, so full description should be:

CENTER_SCREEN_ANNOUNCE:AddMessage(eventId, category, soundId, message, combinedMessage, icon, iconBg, expiringCallback, barParams, lifespan, suppressIconFrame)

eventId - primary use of CENTER_SCREEN_ANNOUNCE is handling messages from various events and each event has different priority. I'm using just 0 (eventId which is not defined), so my messages will have always the lowest priority.

category - The alert category to send the alert to.
CSA_EVENT_SMALL_TEXT, CSA_EVENT_LARGE_TEXT, CSA_EVENT_COMBINED_TEXT, CSA_EVENT_NO_TEXT

soundId - An optional sound id to play along with the message (sound defined in the SOUNDS table)

message - The message to alert (either a string or a function that returns a string that will be called every frame)

(Optional) combinedMessage - For combined text, the secondary text to display (either a string or a function that returns a string that will be called every frame)

(Optional) icon - An icon to be displayed with the announcement
NOTE: Combined text is the only thing that uses icons - and only on the small text label.

(Optional) iconBg - background for the icon above

(Optional) expiringCallback - A callback to be called when the announcement has begun fading out

(Optional) bar params - used for player progress bar

(Optional) lifespan of the message to be on the screen in milliseconds

(Optional) suppressIconFrame - if true, icon frame will be hidden

Last edited by Garkin : 04/27/15 at 01:11 PM.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Animated Announce


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