Quantcast
Channel: Answers by "OctoMan"
Browsing latest articles
Browse All 114 View Live

Answer by OctoMan

Most of the time there are lotsa tuts on youtube already. https://www.youtube.com/results?search_query=unity+5+clothes 6mins long with i believe almost all infos needed.

View Article



Answer by OctoMan

Not excactly sure what you are looking for. When you start your gamescene you set score to 0; void Start() { score = 0; } When your game is complete you compare score with highscore. As you did already.

View Article

Answer by OctoMan

Read this, it might help you out. http://prof.johnpile.com/2014/07/27/generateprefab/

View Article

Answer by OctoMan

Once the collison happens, just search the scene for tagged objects to change values on them. You can store all found in a list and then loop through the list, change all stuff and then remove the item...

View Article

Answer by OctoMan

void OnMouseDown{ animator.SetBool (pressed, true); } void OnMouseUp { animator.SetBool (pressed, false); }

View Article


Answer by OctoMan

private ItemsScript Script; void Start() { Script = GameObject.FindwithTag("theObjectwithTheScript").GetComponent(); //or Script = GameObject.Find("theObjectName").GetComponent(); Script.DoWhatever(); }

View Article

Answer by OctoMan

Destroy(hitTile.gameObject); you are looking for this?

View Article

Answer by OctoMan

Just add your timer IEnumerator script to any gameobject in the scene. And start it in `void Start()`

View Article


Answer by OctoMan

If you are animating in unity , first remove all animations from the gun if there are any.Then link the gun to the hand. This should move the gun with the hand. If not, go into you 3D programm and rigg...

View Article


Answer by OctoMan

You could clamp in your movement into an if-statement, depending on an animation bool. Animator anim; if(anim.GetBool("IsCastingSpell") == false) { //Movement stuff here }

View Article

Answer by OctoMan

You could set the animation speed to 0, or decrease it over time until 0. Animator anim; anim.speed = 0;

View Article

Answer by OctoMan

You can reverse animations using the speed value. Animator anim; anim.speed = -1;//play animation reversed anim.speed = 1; // play animation normal

View Article

Answer by OctoMan

This seems to be a valid solution int itemWeight = 0; for(int i = 0; i

View Article


Answer by OctoMan

You want to trigger an animation, even if it's not ended before? It wouldn't look good but i would try to trigger to idle, and get rid of exit time,so trigger to exit the running animation. Also use an...

View Article

Answer by OctoMan

In Unity4.6+ the easiest way is create the buttons on a canvas, and call the corresponding functions from them. You should check out Event Triggers.

View Article


Answer by OctoMan

Check the Materials folder in the folder where the FBX is located. Is everything there? If yes, just drag the Material on your Model and save it as Prefab, as always.

View Article

Answer by OctoMan

You run OnTriggerEnter in Update? Thats not working! function Update () { } function OnTriggerEnter () { Application.LoadLevel ("Scene1"); }

View Article


Answer by OctoMan

Your Gameobjects need collider and rigidbodys. Make sure your colliders are not trigger colliders.

View Article

Answer by OctoMan

If this an AI-driven movement, you can use a waypoint system, or as suggested Vector3.MoveTowards within a IEumerator to plan timing.

View Article

Answer by OctoMan

If you are using the Animator just set a transition back with only (has exit time) to the Idle animation.

View Article

Answer by OctoMan

ImpactAudio = GetComponents()[1]; shouldn't it be ? ImpactAudio = GetComponents();

View Article


Answer by OctoMan

public Transform yourParent; container.transform.SetParent(yourParent); // needs to be of type transform

View Article


Answer by OctoMan

First make sure your player has a rigidbody component & collider. Also show us the complete copy of your OnTriggerEnter() function which might be on your trigger of the door.

View Article

Answer by OctoMan

create a public function public void LightOn() { Light.enabled = true; } Now drag the script on the light or anywhere. Then drag the gameobject in the buttons onClick event, and choose the function....

View Article

Answer by OctoMan

https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.html make sure you use the namespace using UnityEngine.SceneManagement; Then you can make use of the functions. Example:...

View Article


Answer by OctoMan

Start small, learn learn learn. There are tons of tutorials out there. You can create apps and games, depending of your knowledge. You should start to learn a proper programming language, i started...

View Article

Answer by OctoMan

1. Do you have a GameController GameObject in your scene? 2. Do you have tagged it correctly? 3. Is the script GameController attached to it? 4. Is the GameController GameObject active? 5. Does the...

View Article

Answer by OctoMan

Hints for quest systems are everywhere, but alot approaches are possible to get it finished. Some already in the AssetStore, some incomplete or bad tuts on youtube. Currently i'm working on one, it is...

View Article

Answer by OctoMan

if ( Input.GetMouseButtonDown(0)) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); if(Physics.Raycast(ray, out hit)) { if(hit.transform.tag == "PIG")//ask for a collision tag and see if you...

View Article



Answer by OctoMan

Ints are only full numbers! So it can only be 0 or 1 but nothing in between. I believe you mean floats? If not, make all floats. The rest is mathmatical stuff. Animation Frame Count / 100 = **a float...

View Article
Browsing latest articles
Browse All 114 View Live




Latest Images