Quantcast
Channel: Questions in topic: "javascipt"
Browsing all 1875 articles
Browse latest View live
↧

Making object follow finger?

Hello! sorry for such a broad question, im EXTREMELY new to coding and unity. I'm trying to make a 2d game where, you move a "pick" in a lock....I want it to follow your finger and rotate, with the tip...

View Article


Next Level Using numbers

I'm trying to make a really simple script (because I'm still new to scripting) so when my 2D character enters the collider the next level will start. I've been literally working on this one script for...

View Article


Using a height map to distort a subdivided plane.

Hello! I am working on a game that sed a plane divided into 20x20. I have small images that I would like to use as a height map to modify these vertices. It is very similar to Terrain but on a smaller...

View Article

Is it possible to call a Javascript code on local server from Unity? (Google...

I am testing different ideas, so this is the problem I ran into. I have two php scripts on my local server. The first one does the following: It connects to a database and takes all of the values I...

View Article

Using Couroutines in another Class (Javascript)

Here's the first class public class Coroutiner extends MonoBehaviour { public function Coroutiner() { } public function waiting(num: int) { yield WaitForSeconds(num); } } And here's the second class...

View Article


Muzzle flash script not working properly

Hi all, For some reason this code here doesn't work and I have no clue why: function muzzleFlash () { gameObject.GetComponent(Light).enabled = true; gameObject.GetComponent(SpriteRenderer).enabled =...

View Article

Monodevelop Autocomplete not working for JS

I already had this exact issue with C# in the newest installation of Unity, now it all works fine for C# but doesn't work for unity, I can't for the life of me find out what the hell is the problem....

View Article

Spawning only 1 gameObject

Hello Unity3D.I have a question about spawning?How can i make it that whenever i use the functions GetKey Or GetButton i only spawn 1 and only 1 gameObject?For example whenever i use GetButton For my...

View Article


Player stucks on ladder (with picture)

I have ladder script and it is work properly but when climbing down i have some bugs like the picture my player couldn't away from ladder i know i need add something stop the player when reach bottom...

View Article


Im trying to control a 3d player with 4 GUI buttons and Im trying to attach...

#pragma strict var speed : float = 10; function Update () { Rigidbody.Find("player").velocity.y = speed; }

View Article

2D Rotation Spring Back To 0 Degrees (JavaScript)

Hi all, I'm working on making a 2D platformer game that has a shooting element. What I have is a script that gets the touch input and rotates the gun towards the touch location. What I need to do is...

View Article

unity javascript

So I am doing a game in unity for school about a spaceship avoiding meteorites but I have some problems, I put the script so the spaceship moves up, down, left and right but when it hit the meteorites...

View Article

Line numbers

I am new to scripting and i wanna know what does 82 in line (15,82) mean. Javascript

View Article


Ant Colony Frame Rate Optimization

Hi. I have a script that runs an algorithm that simulates the behavior of an ant or many ants. The when the ant isnt standing on a quad that is called a "square" it creates one using Instantiate and...

View Article

Unity2D moving on the y-axis

Hello Heroes of Unity Answers! I am trying to make a game similar to Castle-Crashers ([https://www.youtube.com/watch?v=HhPHRm-kJ5w][1]) And I can't seem to figure out how to make my character move up...

View Article


I need help making a UI button that when pressed shoots a projectile.

I'm making a mobile game on android and I need to make a UI button that makes a projectile shoot out of the character. Can anyone help?

View Article

How to disable the same component in multiple gameobjects?

Here's my script: #pragma strict var otherPlayers : GameObject[]; @RPC function MultiplayerControlsDisablation () { var otherCameras : Component[] = otherPlayers.GetComponentsInChildren.(); for (var c...

View Article


So many errors! And I need help with the GUI

Hello! I am excited to start coding my first game ever (in Javascript)! I started by coding the resources and how they are produced. It was just a "skeleton" of what the actual mechanics will be, but I...

View Article

Best way to move up and down character

My character moves forward back left and right with "wasd keys" but i want to move up and down like bee or something like that with "q and e" keys. What is the best way to this any idea?

View Article

Building a Snap System, Need Help

So I have a basic snap system kind of set up. I have a parent cube with 4 other cubes around it at 1 unit that act as connection points. All connection points are children of the middle cube. Half of...

View Article
Browsing all 1875 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>