- Home /
This question was
closed May 20, 2013 at 04:36 AM by
AlucardJay for the following reason:
Duplicate Question
Question by
Tebrithiel · May 20, 2013 at 02:29 AM ·
javascriptdetonator
calling a CS module from within Javascript
Hey guys, I need help I am trying to call an Explode() function from CS with JavaScript. What do I need to do to make it work? I am using Ben Throop's detonator pack. Here is the code I am using: #pragma strict var growth : GameObject; var Value : float; var scle;
function Update () {
if(Time.timeScale == 1.0){
scle = Value/1000;
growth.transform.localScale += Vector3(scle,scle,scle);
}
if(growth.transform.localScale == Vector3(100,100,100)){
Explode();
}
}
function OnGUI(){
if (MainCode.Attrib == true){
Value = GUI.HorizontalScrollbar (Rect (25, 25, 100, 30), Value, 1.0, 0.0, 10.0);
}
}
Comment
This question has been asked and answered many times before (especially by me). Try searching before asking duplicate questions.
Follow this Question
Related Questions
Instantiating 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
FPS Controller and Explosion? 2 Answers
Detect explosion Character Controller 4 Answers