Quantcast
Channel: Answers by "ransomink"
Browsing all 80 articles
Browse latest View live
↧

Answer by ransomink

Your speech is off-putting and very confusing. Proper English may help in this situation. Seems you need to check if the instance is null, possibly something like: if...

View Article


Answer by ransomink

Like Eric5h5 mentioned, you have to set an Transform as a parent, not a Gameobject, like your hands variable. Do something like: currenthand.transform.parent = hands.transform; But I don't think you...

View Article


Answer by ransomink

It should still show your Debug.log's inside the console. I test on an Android and everything shows inside of there...

View Article

Answer by ransomink

I'm guessing, you need to access a collider outside of the trigger event? If so, you can do this: #pragma strict var externalCollider : Collider; function OnTriggerEnter( col : Collider ) {...

View Article

Answer by ransomink

I copied your code, placing the main script on a gameobject and the trigger script on a different gameobject. I indeed received the same error as you: "'finish' is not a member of 'function(): void'"....

View Article


Answer by ransomink

First, you must have a reference to the script you wish to enable/disable. You can make this a public variable and drag the gameobject using the script into the inspector: public var scriptName :...

View Article

Answer by ransomink

Your code is quite confusing and not as readable. This problem stems from its format/layout. You should definitely indent your curly brackets to better understand what piece of code lies in each scope...

View Article

Answer by ransomink

I seem a bit confused. topRight will only turn to false if you set it to false after it moves from the correct position. Once you set it to true, it stays true until you set it to false again. So my...

View Article


Answer by ransomink

It's hard to tell without posting your entire script for Pathing and PathFollower. Displaying the lines for each error (along with the script) helps us better understand the problem; so I'm assuming...

View Article


Answer by ransomink

Are you sure the error is on the line: transform.LookAt(choosenBoulderFish.transform.position); Is that your entire code or just an excerpt? I just tested this out and it worked with no errors. using...

View Article

Answer by ransomink

You will need to declare var *remainingTime* outside of Update() in order to access it from another script. You can keep it private and create a getter/setter, then set its new value after the player...

View Article

Answer by ransomink

Think I know what you mean, but it doesn't relate to Unity3d. You can create code snippets with your coding program (MonoDevelop, Visual Studio, FlashDevelop, etc). They're basically shortcuts for...

View Article

Answer by ransomink

You can either reset the script by clicking on the gear icon (to the right of the script name) and choose "Reset", or you can remove your script and add it back. Also, a script will not reload or...

View Article


Answer by ransomink

I went ahead and recreated the script for turning the flashlight on/off. I simplified draining the battery and charging the battery by placing them inside of functions. It is much easier than having...

View Article

Answer by ransomink

You can do: GameObject healthOrb = Instantiate(Resources.Load("HealthOrb"), "Place position here", "Place rotation here") as GameObject; or GameObject healthOrb =...

View Article


Answer by ransomink

It's because you're using JavaScript; `GetComponent() ` works for C#, but not JS. You have to place a "." after GetComponent. Here are the two ways you can write this:...

View Article

Answer by ransomink

When you grab the first supply (the *target* variable), I assume that object is destroyed. If so, then once it gets destroyed the *target* will not have a reference. During the next Update(), it will...

View Article


Answer by ransomink

When you instantiate an AI clone, add them to a list, like: `public List drivers `. The list will contain all AI drivers. Once the race ends, iterate through the list to access each AI's race time. If...

View Article

Answer by ransomink

What line is giving you this error? It seems a GameObject or variable was not set: either in the inspector or the code, provided you can give us what line the error is on...

View Article

Answer by ransomink

You have to edit the PlatformerCharacter2D script. Either make the variable public from private bool m_FacingRight; to public bool m_FacingRight; - or create a property for it private bool...

View Article
Browsing all 80 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>