Page 1 of 1
Typewriter effect?
Posted:
Sunday, 22.June 2014, 18:33
by Skinnytorus
Hey guys,
I've been wondering how to make a typewriter effect in wz4 and here is what I came up with. Yes, it can deal with words and small sentences, but what if a long text needs to be animated? What about the flashing cursor? Any ideas?
Edit: I think we can achieve that effect by masking material's diffuse channel. But then we're gonna need a 'step' function which is not available in anim script wz4 language... Maybe modulo function could help?
Re: Typewriter effect?
Posted:
Monday, 23.June 2014, 05:36
by ikam
you can do a modulo with the % symbol, like that :
t:int = time*1000;
if(t%2)
// do something
(modulo is only available for int, so convert time (float range from 0 to 1) to int, multiply it by 1000 to get a int value ranging from 0 to 1000).
Re: Typewriter effect?
Posted:
Monday, 23.June 2014, 08:58
by Skinnytorus
Thanks very much for a very useful tip!
I will try that this evening. One more question though: am I goona need a loop to make the motion 'cumulative'? Say, each time if(t%2) condition is true I would like to move the mask +0.1 unit relative to its previous position. How is it gonna look in code?
Re: Typewriter effect?
Posted:
Monday, 23.June 2014, 18:23
by Skinnytorus
OK now. Got it working. Here is the script. Paste it into Transform operator. The only thing left is to make it work with the mask for the text
)
- Code: Select all
t:int = int(time*128);
if(t%2) trans.x=t;
else trans.x=t+1;
Re: Typewriter effect?
Posted:
Tuesday, 24.June 2014, 16:06
by ikam
nice
Re: Typewriter effect?
Posted:
Thursday, 26.June 2014, 06:03
by CybeREX
Nice one
here is code for flashing light for example.
- Code: Select all
t:int = int(time*128);
if(t%2) trans.x=sin(t);
else trans.x=sin(t);
Re: Typewriter effect?
Posted:
Thursday, 26.June 2014, 08:42
by Skinnytorus
Thanks. Will check that this evening.
Re: Typewriter effect?
Posted:
Sunday, 23.November 2014, 05:33
by Skinnytorus
Hey, guys.
I suggest a new strategy: use Debris. Have a look.
Any ideas how to get rid of the jugged edges?
Re: Typewriter effect?
Posted:
Sunday, 23.November 2014, 06:59
by Skinnytorus
Found a better solution. Use the TronFont instead!
Re: Typewriter effect?
Posted:
Sunday, 23.November 2014, 16:26
by ikam
the 2 is perfect
well done
Re: Typewriter effect?
Posted:
Sunday, 23.November 2014, 18:55
by Skinnytorus
Thanks, man. I'm thinking about adding a cursor