Question by
tadesco18 · Aug 31, 2016 at 07:20 AM ·
interactionstrings
Am trying to make a story with characters taking; by doing this i created an array os strings. all i need left is to destroy it each time every 10 seconds.
@Header("Setting") var Talk : float; var Story : GameObject;
@Header("Speakers") var chats : Text; private var change : String; private var remover : int; @TextArea(3,10) var chars : String[];
function Start () { Story.SetActive(false); }
function FixedUpdate () { Linez(); }
function OnTriggerEnter(){ Story.SetActive(true); }
function Linez() {
for(var i : String in chars){
chats.text = i;
change = i;
Talk++;
if(Talk == 300){
Talk = 0;
destroy(I); } }
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612091842im_/https://answers.unity.com/themes/thub/images/avi.jpg)