Answer by MithosAnnar
Hello CazicThule! I like your question and have voted it up. The answer would be to use noise to create you terrains. I learned about noise while animating in cinema 4d....
View ArticleAnswer by MithosAnnar
If you want to make the button disappear use this script: var bool : boolean = false; if ( bool == false) { if ( GUI.Button( Rect(70, 25, 50, 50), "Something")) { bool = true; } }
View ArticleAnswer by MithosAnnar
ReceivingScript.js: var GUIEnabled : boolean = false; var canLoot1 : boolean = true; var canLoot : boolean = true; var copper : int; var silver : int; var gold : int; function Start () { silver =...
View ArticleAnswer by MithosAnnar
if you have also had this problem, all you have to do is re - Install Xcode with the SDK.
View ArticleAnswer by MithosAnnar
Ok.. it may have taken me an age, but here it is. And it works too! LootGenerate.js: var icon1 : Texture; var icon2 : Texture; function Loot1 () { SendMessage ("FirstItem", icon1); } function Loot2 ()...
View ArticleAnswer by MithosAnnar
I have a script that might be able to do that. var aGameObject : GameObject; //you don't have to define this in the inspector var move : float = 5; //the amount to move function Start () { if (move ==...
View ArticleAnswer by MithosAnnar
Attach this script to your enemy. EnemyHealth.js: /* Attach to the enemy */ //the amount of health the enemy has var hP : float = 100; //the amount of health the enemy should not have more of var maxHP...
View ArticleAnswer by MithosAnnar
Ok, not to fear there skully. And don't worry about the format its fine. Attach this script to your robots: **chase.js:** var target : Transform; var moveSpeed = 3; var rotationSpeed = 3; var...
View ArticleAnswer by MithosAnnar
you could try this: function OnGUI () { if (GUI.Button (Rect(0, 0, 20, 20) { Application.LoadLevel("WhatEverYouCalledThisScene"); } } I believe the scene before you load a new one is inactive to save...
View ArticleAnswer by MithosAnnar
Ok, I finally fixed the problem. The solution was to make an empty GameObject and make the GUI elements a child of it and then instantiate it with the enemy. Thanks for the help!
View ArticleAnswer by MithosAnnar
The correct and simple answer is this: for (var item in items) { (item as GameObject).SendMessage("Activate"); } I decided to come back to this after a while. And it took me an hour and a half but this...
View ArticleAnswer by MithosAnnar
We solved it! Here is the script for anyone who is interested! var myTransform : Transform; var mousePositionStart : Vector3; var mousePositionEnd : Vector3; var direction : Vector3; var move : boolean...
View ArticleAnswer by MithosAnnar
It took me bloody ages but i finally did it!! Here it is for anyone who wants to fire an arrow properly. make a plane with an archer sprite and animation script on him. put an attack script on the...
View ArticleAnswer by MithosAnnar
Easy Peasy. public GameObject spot; public Vector3 v = new Vector3(42, 42, 42); GameObject go = Instantiate(spot, new Vector3(0, 0, 0), Quaternion.identity) as GameObject; go.SendMessage("TheStart",...
View ArticleAnswer by MithosAnnar
Potential answer here... I found something [here][1]. When I Brought it into unity, I got these: Errors: Shader error in 'POM': GLSL vertex shader: ERROR: 0:289: 'o' : syntax error syntax error at line...
View ArticleAnswer by MithosAnnar
The seriously messed up thing is this. ![alt text][1] And its what I get when I import the fbx file back into c4d from the asset folder where it was exported. Cheers! Mithos [1]:...
View ArticleAnswer by MithosAnnar
Hi Mike,"Ray - Casting" is what you would want. Please have a look at these. http://answers.unity3d.com/questions/318428/problems-with-raycast-obstacle-avoidance.html...
View ArticleAnswer by MithosAnnar
Hi Alex, I made an example scene for you: https://dl.dropbox.com/u/107533178/DissapearingCubeExample.zip There is a script on the camera that accesses the cubes renderer. Really basic stuff. Cheers!...
View ArticleAnswer by MithosAnnar
Hi Akos, Have you tried: Vector3 movementThisStep = (myRigidbody.position - previousPosition); Cheers! Mithos
View ArticleAnswer by MithosAnnar
Hi lildevil345, That is a c# script you are using. I'm afraid we don't use var in c#, instead try: Private bool shootActive = false; Remember, In c# you have to declare the kind of variable. Cheers!...
View Article