syntax for 'using' in javascript
I'm watching a tutorial on some pathfinding resource and the tutorial uses c# but I use java script. I can manage converting what i see in the tut from C# into java script, except for the 'using' line....
View Article2d ragdoll, where to start?
In my current project I need to implement a 2D ragdoll. But, I have no idea how to go about this, or even where to start. After some fruitless Goggling I figured I'd ask someone who knows about this,...
View Article2d ragdoll joint connection.
Im trying to figure out how to link the joints of a 2d ragdoll like [this ragdoll][1] should i use joints, and if so which joint would be best for making sort of a pin connection where the 2d planes...
View Articletexture click detection is off
im trying to setup a texture to be clickable. Before anyone says it, i know that there are button for this. But I'm using texture. my code looks like this: #pragma strict var background: Texture; var...
View ArticleERROR: It is not possible to invoke an expression of type 'float'.
totally stumped by this error... I know its gotta be something simple i just cant see it.\ #pragma strict var sounds : AudioSource[]; var nextShot : float; var shootSpeed : float; function Start () {...
View ArticleJS access spherecast position
In this 2d concept im trying to make a bacteria colony produce spores. So i make it look in a random direction around itself and if it casts a sphere in that direction without hitting any other spores,...
View ArticleJS spherecasting placement not working as intended.
![alt text][1] in my little concept im making theres a colony(big dot) that spawns spores(small dots) the spores also make a couple of spores, then go sterile so they don't create spores infinitely. In...
View ArticleHow to code input.
Hi, i'm new to scripting and i'm still trying to learn to code efficiently. so far i have a small list of possible inputs inside my character script's 'update' function. one for the flashlight,...
View Article(java script) how to make mouse invisible.
iv noticed alot of games make the mouse go invisible and stick to the middle of the screen (no matter where you move it). Is it possible to do this in unity?
View Articlecalling function with yield, from update
i have a situation where i'm calling a function with "yield waitForSeconds" in it, and i'm calling it from update. will it just constantly be pestering the function opening a huge mess of copies of...
View Articlejavascript xor
if there an xor symbol? i have an if statement right now like: if(someBool || someBool2) but it would work better if i could do: if(someBool "xor" someBool2)
View ArticleTime.timeScale and Time.fixedDeltaTime
I'm making a quick menu for my game, when it pops up the game time slows down to 10% normal speed while you do your quick menu stuff. then time speeds back up to 100% when you let off the button. but...
View Articleaccess the animation array in an animation component.
in the inspector of my animation component, i have an big array full of animations. but i don't see a way in the scripting reference to access them. but i need to check them for their length when they...
View Articleimporting google play game services with javascript
iv been following this video tutorial: https://www.youtube.com/watch?v=XmHXl-UFTqM iv followed it to the letter up until 12:21 and everything works nice when i follow his instructions with a C# script,...
View Articledetecting when admob interstitial ads are closed
Is there some function being called when the ad closes that i don't know about? for instance: when my users close the ad i need them to go to another page, where would i put that code to switch pages?
View Articlegoogle play services: picking a random user?
is there a way, using google play services, to pick 1 random user of the app; based on a given area (in my case the entire united states). and maybe put some filters on, like, people who agreed to...
View ArticleUI elements not animating colors
I have some UI elements in my scene (a couple UI.Texts and a UI.Image). they are all controlled by one animation, they have keyframes for movement, and color changes. They move as intended, but, their...
View Articleusing array functions on a string?
is there a way to use the array functions on a string, such as push, pop, shift, and all that? i tried to convert from string to char[] but it that doesnt work. i'm making a text adventure styled game...
View Articleoptimizing a forest.
So i'm trying to make a forest and iv been looking into combining the various tree meshes into one, but then i heard someone say something like: once they are combined, they will all want to render...
View Articlerich text issue
i'm working with a UI.text element and i have the rich text checked, but i'm using a little function that types out strings character by character with a little pause inbetween. I wanted to color code...
View Article