Explanation:
I’m trying to make a timer code that when it count to zero then “something” will activate it for example, you have 30 sec to prepare up then when its 0 sec. The door will open it…
Can anyone help me with it? I did tried compare 1.0 script to 2.0… still can;t figure it out ~
if (this.status==="hidden") {
this.shadowtiming+=dt;
if (this.shadowtiming>this.shadows*20) {
this.status="";
this.model.model.model.meshInstances[0].material.setParameter('material_opacity', 1);
this.model.model.model.meshInstances[1].material.setParameter('material_opacity', 1);
this.Root.script.Output.write(this.dataWarnings[0].leavesh);
this.shadowtiming=0;
}
//app.root.findByName('Root').script.Output.write(this.shadowtiming);
}
this is a code that change the opacity of a material back to visible (1) after this.shadowtiming time is passed i guess this can help you to understand. you have to put it inside update: function