Quantcast
Browsing latest articles
Browse All 90 View Live

Answer by doomprodigy

Alright Firstly Have a script which contains all of your gloabal variables (So they can be called from all scripts, I like this way it keeps it nice and tidy.So you might haveVariableScript.csand this...

View Article


Answer by doomprodigy

Im unsure about how to fix your problem but I prefer to try to have all my scripts in a certain language rather than multiple languages as when it comes to compile time I know I will not have any...

View Article


Answer by doomprodigy

Fixed it, I forgot to add my audio to script, so It then decided that without the Audio the build would not work. Cheers for explaining Statement.

View Article

Answer by doomprodigy

With all of those tutorials it is very easy to start. I suggest you read through the Unity Script References. It helps you understand everything and gives you other examples on how you can utilize...

View Article

Answer by doomprodigy

With Fantasy work, In my opinion get yourself pleanty of models of your houses / castles/ villages, variation of trees and plants etc first. I find that once the assests are built and you have grand...

View Article


Answer by doomprodigy

As DaveA said, You have to program it yourself, Health is straightforward, Try to be a lot more specific with your questions.Here is some health (C#)public float Health = 100f;There is health, merely a...

View Article

Answer by doomprodigy

[http://wiki.unity3d.com/index.php?title=Server_Side_Highscores][1]Script/Tut for simple Server Side Highscores. Thats the basic of it.Peace, Aaron Lewis [1]:...

View Article

Answer by doomprodigy

I am unsure about samples though these packages/projects do. I know that Unity Steer avoids people, and that A* Pathfinding avoids walls (Have not used either personally) so avoiding people would be...

View Article


Answer by doomprodigy

Heres one. I use raycast for my guns so this should work.if (Physics.Raycast (gunPos, direction, hit, bulletRange)) { //Check if we hit something if (hit.rigidbody){ // Apply a force to the rigidbody...

View Article


Answer by doomprodigy

If I get what your saying. You want to disable a object and enable the rest. use SetActiveRecursively if true it will enable the item/activate and that object children aswell. if false it will deactive...

View Article

Answer by doomprodigy

Unsure on what the cause is, though make it gofunction Update(){ if(isRunning == true) { animation.CrossFade("run"); } else if(isRunning == false) { animation.CrossFade("Take 001"); } var...

View Article

Answer by doomprodigy

Model the Scarf etc first and then add it to the current model with colliders as GBStudios said, then add the modifier. This will work for Scarfs, Capes etc. For a cloak or robe etc, model it with your...

View Article

Answer by doomprodigy

Unsure if this is what you are looking for but to stop an object moving on the Y Axis use.transform.eulerAngles = new Vector3(0,transform.eulerAngles.y,0);Untested*Peace, Aaron Lewis

View Article


Answer by doomprodigy

Since those methods are not working for you. Maybe use an empty gameobject above the mushroom with a trigger and when you enter that trigger sendmessage to call the jump function and subtract health...

View Article

Answer by doomprodigy

I am unsure as to how the enemy in the FPS Tutorial is working but in the AI, I programmed for my FPS my enemy used a raycast for shooting, simply aim a raycast at the diagonal angle that would hit you...

View Article


Answer by doomprodigy

It depends on how you model your character, are you modeling him whole with legs and everything or are you just modeling the gun and hands. Your question is very confusing. I model the weapon and the...

View Article

Answer by doomprodigy

Write your own script. If you just use scripts you find on the wiki or in the standard assets you wont gain anything unless you understand how they work. And if you understand how they work you can...

View Article


Answer by doomprodigy

Really those will slightly help you but what will guarantee that you learn scripting in unity well is the Unity Scripting Reference. Considering that you have a fair grasp on other languages you should...

View Article

Answer by doomprodigy

Meltdown is completely correct, no one will write code for you especially when all of the resources are around you to do what you want. For Shooting and Reloading look at the old FPS Tutorial scripts....

View Article

Answer by doomprodigy

You question is not a question. It has no code to fix. You haven't shown or attempted anything. If I did take it as a question use the Search Function, The Forums and Google. I'm 100% sure you will...

View Article

Answer by doomprodigy

I suggest using an int.private int swingNum = 0; private bool swinging = false; public float swingTime = 2.0f; void Update (){ if (Input.GetButtonDown("whatever")){ if (swinging == false){ if (swingNum...

View Article


Answer by doomprodigy

using UnityEngine; using System.Collections; public class Look : MonoBehaviour { private Vector3 inputRotation; private Vector3 mousePlacement; private Vector3 screenCentre; void Update () {...

View Article


Answer by doomprodigy

What you want to use for a easy method is just a if (Vector3.Distance(other.position, transform.position) < tooClose){ moveSpeed = 0; } That way once the AI's distance between the player and the AI...

View Article

Answer by doomprodigy

private int attackNum = 0; private bool attacking = false; void Update (){ if (Input.GetButtonDown("Attack")){ if (attacking == false){ if (attackNum == 0){ StartCoroutine("AttackOne"); attackNum += 1;...

View Article

Answer by doomprodigy

It is not to do with your enemy spawner. It has something to do with the prefab that you are instantiating. Look down the prefab in the inspector and see if the prefab has gaps such as None(GameObject)...

View Article


Answer by doomprodigy

Texture size, Textures Format, There is nothing much you can do about project size. What is limiting you size? There is not much you can do about your Models and the size of them. FBX is standard for...

View Article

Answer by doomprodigy

You can swap which material is on by using. public Material[] materials; void SwapMaterial0 () { renderer.sharedMaterial = materials[0]; } void SwapMaterial1 () { renderer.sharedMaterial =...

View Article

Answer by doomprodigy

What I would do as dannyskim said is move the transform position of the camera to the character. So On a script that is attached to the player add this: void Start () { mainCamera = (GameObject)...

View Article

Answer by doomprodigy

If you put them all into a list that have the tag, then find the closest by distance. Something like this should work. public List targets; public string objectTag = "Object"; private Transform...

View Article


Browsing latest articles
Browse All 90 View Live