27.03.2012, 14:58
(
Last edited by clavador; 04/04/2012 at 10:13 AM.
)
For the old version, refer to this link.
So, this new version has the same effects than the previous, but now supports multiple effects at once!
Not much has changed since the last version about the use. It pretty much remains the same, so you may want to read this before using this new version.
What changed?
You create the textdraws as usual ( read the first version for info about this ), and then you need to add this before using any of the effects ( just one time before each string of effects! ):
That is just a nice macro for "new tid", wich is a variable that stores a random id number for the timers. You can just do "new tid" and it would be the same.
And then you just use the usual functions:
And finally, to hide the textdraws you now use:
TextDraw_Hide( playerid, timerid, textdrawid_min, textdrawid_max );
The timerid is the id of the timer wich has been assigned to each textdraw effect. You don't need to specify it. Just use it inside "OnAnimFinish()" and you're good to go.
Enjoy and comment any bugs!
Download:
Version 2.1
Version 2.0 ( 27-Mar-12 )
Test script
Bugs:
- The first time you show the "grow" animation, it can look "laggy", but it will work fine after the first use.
Updates:
Textdraw Animations v2.0!
[ame]http://www.youtube.com/watch?v=jKmpM86T8Ns[/ame]So, this new version has the same effects than the previous, but now supports multiple effects at once!
Not much has changed since the last version about the use. It pretty much remains the same, so you may want to read this before using this new version.
What changed?
You create the textdraws as usual ( read the first version for info about this ), and then you need to add this before using any of the effects ( just one time before each string of effects! ):
pawn Code:
Init_Effects()
And then you just use the usual functions:
pawn Code:
Init_Effects();
TextDraw_FadeIn( playerid, TEXTDRAWS_ANIMATION_0, 100, 0, 0, 2 );
TextDraw_Pulsate( playerid,-1,40, 100, 8, 10 );
TextDraw_Hide( playerid, timerid, textdrawid_min, textdrawid_max );
The timerid is the id of the timer wich has been assigned to each textdraw effect. You don't need to specify it. Just use it inside "OnAnimFinish()" and you're good to go.
Enjoy and comment any bugs!
Download:
Version 2.1
Version 2.0 ( 27-Mar-12 )
Test script
Bugs:
- The first time you show the "grow" animation, it can look "laggy", but it will work fine after the first use.
Updates:
Code:
Changelog v2.1: - Fixed a bug at Textdraw_Pulsate. - Added option to Textdraw_FadeIn to play a sound for each textdraw shown. Sintax would be: TextDraw_FadeIn( playerid, index, speed, duration, t_buffer_min, t_buffer_max, soundid );