Quantcast
Channel: Latest Questions by MithosAnnar
Browsing all 60 articles
Browse latest View live
↧

How to draw a line with touch?

I am trying to draw a line with LineRenderer that follows the user's finger movements. So far I have been unable to draw a line, let alone have it follow the user's finger. I am coming from objective-c...

View Article


Turn OnGUI to OffGUI

I am developing for the iphone but want to use OnGUI for its convenience, What I would like to do is set when OnGUI gets called. Is there a simple way to do this?

View Article


GameObject transfer information

I don't know why but I get a null reference exception every time i call this function: function AddToInventory () { var inventory = player.GetComponent(Inventory); isTrigger = true;...

View Article

Picking up an object

I am getting from what I can see a very bazar error telling me that AddToInventory has no receiver. Sending the information script: if (canLoot2 == true) { if (GUI.Button( Rect( 280, 70, 50, 50),...

View Article

Can't add GameObjects to ArrayList

I am sending information from my item to my inventory. Telling the inventory to add the item. Gives me a null reference exception. Item.js : inventory.AddItem(this as GameObject); Inventory.js : var...

View Article


for loop error

In my Inventory script (with #pragma strict turned on) I Get the error Cannot convert 'Object' to 'UnityEngine.GameObject'. var items : List.; function OnGUI () { for (var item : GameObject in items) {...

View Article

lock GUITexture on the screen at specific co - ordinates

Hello.. I have redone my game entirely without the use of OnGUI, (which was causing a lot of problems for me). But now that I am not using OnGUI I have had to put the functionality into my GUI...

View Article

UnityText Or PhotoshopText(as image)?

So I was maxing on my overhead and I came across an Idea, I was wondering why I should even use GUIText or 3DText, when I can easily import a photoshop image of text (with the 'save for web' option). I...

View Article


TimeScale collider, where all the time outside is frozen?

The trouble i'm having is yet another memory problem. I thought that if I could have like, a 'sphere collider' around my character, that allowed time to flow normally and stop the time for everything...

View Article


Touch movement not working

I am trying to move a gameObject by touch. #pragma strict var player : GameObject; var moveToPos : Vector3; var touchPos : Vector3; var myTransform : Transform; var moveSpeed : int; function start () {...

View Article

How do I un nulify a nullified object?

I nulled an object and I would like to un null it. Like when I receive a message the object gets nulled. How do I un nullify it? Thanks for any answers!

View Article

How Do I Drag And drop GUITextures From Set Positions?

I simply want to be able to loot an enemy and have the looted item go to a default position in the inventory. If the default position is taken, then I want the item to go to the position next to the...

View Article

How do I adjust a GUITextures width, from the left?

So I have been googling everywhere, and have found nothing. My problem is that when I attack my enemy, its health bar is shrinking from right to left. The reason, I think is this: *Width Right-most...

View Article


How Do I Procedurally Generate Clouds ?

Hello Community! I am giving procedural generation a crack. the goal is to instantiate planes (clouds) in a random area on screen. In my case 0 - 480 on the x - axis, and 0 - 360 on the y - axis. The...

View Article

How do I Adjust The Colour Of My Object By Percentages?

Hello, and how *are* you? I'm trying (and very, very hard at that!) to change the colour of an object by picking up other objects, what are a certain colour. For example: If I was to pick up two red...

View Article


EARTH CALLING ANSWER!!!!

I am making a 2d game. I have an object, that I want to move by swiping. But I want to move in the direction of the swipe (not to the swipe). I have a script but it doesn't work, because I don't know...

View Article

How Do I Edit The Size Of A Value With A Number? [Solved]

I have speed based on a parameter - how many particles I have. My default and minimum speed, is 4. When I receive the message to increase my speed, I want to increase the speed based on the amount of...

View Article


How do I spawn Offscreen?

Hi, This is the updated script. My player constantly changes position, when he moves a message is sent (Direction) to spawn a particle. The problem I am having is that even though most of the particles...

View Article

How do I rotate this plane to face the position of the mouse?

I rotate a plane to face a certain way, like this.. Script.js: if (canRotate == true) { rotation = Vector3(Input.mousePosition.x - Screen.width / 2, 0, Input.mousePosition.y - Screen.height / 2); }...

View Article

Small video files or sprite sheet animations?

Which do I use? I have motion 5, which is a powerful video engine. I can make files as small as 14 x 14 pixels, which is the size i need for my game, the file can then be compressed. Alternatively I...

View Article
Browsing all 60 articles
Browse latest View live