š [Script] Tap / Touch Change Text Script - Random *Important
šµššš šÆšššššš¤š šø
Posts: 761 š„š„š„š„
Script:- Change Text on Tap Random
Ready to use Script
// Change Text Objects on Tap Script Random // @input Component.Text mytext // Add More Text Line by Line var arr = [ "āI Love Lens Studio 1.ā", "āI Love Lens Studio 2.ā", "āI Love Lens Studio 3.ā" "āI Love Lens Studio 4.ā" "āI Love Lens Studio 5.ā" "āI Love Lens Studio 6.ā" "āI Love Lens Studio 7.ā" "āI Love Lens Studio 8.ā" "āI Love Lens Studio 9.ā" "āI Love Lens Studio 10.ā" ]; //var randomNumber = Math.floor(Math.random() * 10) + 1; var randomNumber = arr[Math.floor(Math.random() * arr.length)]; var anyvalue = randomNumber; script.mytext.text = anyvalue;
Steps to use:-
- Create Scene Object
- Add Script Component
- Create Script In Resource Panel & Rename it as TouchTextScript
- Add TouchTextScript to Scene Object Script
- Add Your Own Text
- Copy Paste this Script & Save
Use:-
- Change Multiple Text in Single Text objects on Touch.
- Change Multiple text on Touch as Random.
- No Need to Create Multiple text Objects / Screen Text Objects.
0