A type of programming, often meant to be easier to learn than more "traditional" programming. Scripting is often used when performance is less important than ease of use. Examples of scripting languages are: Javascript, Lua, Perl, Python, and PHP. Scripting languages are often interpreted instead of ...

learn more… | top users | synonyms

0
votes
1answer
51 views

How do I make the ui button to move my character?

How do I make my character move left,right and jump when click ui buttons using this code? using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public float maxspeed = ...
0
votes
0answers
19 views

How do I make Ground Check stop rotating with the character when it rotate?

How do I make my character routice without Ground Check rotating with it, but still follow my character? Code: using UnityEngine; using System.Collections; public class Player: MonoBehaviour { ...
0
votes
0answers
17 views

Character fixed angle? [duplicate]

I want my character to rotate so I turn off fixed angle in Rigidbody 2D, but the problem here is that I can't jump in any other angle except for the angle where I have my groundcheck. Can anyone help? ...
0
votes
0answers
32 views

Character can't jump in other angle with fixed angle off

I turn off fixed angle so my character can rotate, but it can only jump in 1 angle but I want it to jump in every angle. How do I do that? Code: using UnityEngine; using System.Collections; public ...
0
votes
1answer
130 views

How do I make my character jump in every direction?

My character can only jump when he is grounded, but he can only grounded in one direction I want him to jump in every direction, can anyone help? CAN JUMP : CAN'T JUMP : Code: using ...
0
votes
0answers
29 views

How do I make my character jump in any position? [closed]

My character is a square which can jump in position x and y but I want it to jump all position How can I do that? Code: using UnityEngine; using System.Collections; public class Player: ...
0
votes
2answers
57 views

A 2D Camera Follow Script That Does Not Rotate?

I am attempting to make a 2D racing game. So far I have a player car (sprite) and a main camera. I would like to know how to make the main camera follow the player car while still showing signs of ...
0
votes
2answers
127 views

How do I make my character jump in any angle?

My character is a square which can spin in any angle but it can not jump in certain angle Can anyone help? using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public ...
0
votes
1answer
83 views

Actually Implementing “C# as a scripting Language” in XNA

Following an example from this thread, I've made an application that dynamically loads in C# "scripts" (actually, plugins) into my game -- but I've hit a snag: how do I reference the assemblies for ...
-2
votes
1answer
42 views

How do I make my character run infinitely? [closed]

I got my character running right (can't run left) and jump but I don't know how to make him run infinitely can anyone help? using UnityEngine; using System.Collections; public class Player: ...
1
vote
1answer
62 views

How do I make my character stop going left? (Unity)

So I have this code and my character can go left, right and jump. I don't want the character going left , so how can I remove that. (I'm very new with coding) using UnityEngine; using ...
1
vote
1answer
25 views

Animator has not been initialized

My animation is working but unity keep saying that my Animator has not been initialized error Here my Code: using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public ...
-2
votes
0answers
20 views

Unity error CS1519 and error CS1525 [closed]

using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public float maxspeed = 10f; bool facingRight = true; bool grounded = false public Transform ...
1
vote
3answers
92 views

How does Unity call “update()” in the scripts?

I understand that you can expose your C++ code to a scripting language such as ChaiScript. From this you can call code that you've made in C++. In Unity, however, they have functions in the script, ...
0
votes
1answer
67 views

Unity 5: 3rd Person Controller runs by default. How to change this?

I have been working with the Third Person Controller of the Standard Assets (called Sample Assets in the beta versions) in Unity 5. When the player press the forward button, the character runs by ...
2
votes
2answers
66 views

DontDestroyOnLoad() doesn't work in Unity

I have a problem with DontDestroyOnLoad() in Unity. It does not work! My code: private static PlayerSpawningScript instance; public void Awake() { Debug.Log ("PlayerSpawningScript awake"); ...
1
vote
1answer
59 views

Instantiating prefabs dynamically in script

I have a canvas object. I right click it and add a Button, which defaults to having a rect transform, image script, button script and text child object. I make it a prefab and delete it from my ...
0
votes
1answer
57 views

Compiled vs Scripting Plugin System

I'm making a very simple game that revolves mostly around user-created mods. So far I've seen most games using Lua or something like Lua to enable user scripting, but recently I've seen people using ...
0
votes
1answer
60 views

Unity Collision Difficulties (How do I make a ground in unity with lots of pieces that doesn't have poor collision?)

So I'm working on this game that I came up with the idea for while watching the Unity Roll-a-ball tutorials. So it's probably important to note that I'm extremely new to game design and I don't have a ...
0
votes
0answers
87 views

Physics2D.OverlapCircleAll seems to be bigger than my radius

Im trying to make a "Scorched earth"-like game using unity. I managed to fire my bullet and make it explode on contact. What I am trying to do is do some damage to the tanks even if the bullet didn't ...
0
votes
0answers
104 views

Anti-Roll bar doesn't work

I'm making a racing game in Unity that has trucks as vehicles. For the truck movement, I'm using WheelColliders. After some testing, I found out that after a certain speed (~60km/h), turning made the ...
1
vote
1answer
128 views

How to write testable MonoBehaviour and test scripts in Unity?

I had problems with decoupled scripts and exposing interfaces in Unity, and these answers helped me a lot. But now, since I don't have hard-coded references in my scripts, I wanted to write unit tests ...
14
votes
6answers
2k views

How can I avoid tight script coupling in Unity?

Some time ago I started working with Unity and I still struggle with the issue of tightly coupled scripts. How can I structure my code to avoid this problem? For example: I want to have health and ...
0
votes
2answers
106 views

How do I access my existing script from a different script attached to a different gameobject?

I have my health(script) component on my player gameobject that gets boosted whenever we tap on that gameobject. However, I want to add a separate Gui texture button gameobject and tap on that to ...
1
vote
1answer
100 views

Questions about scaling in a 2d game in unity

Okay, so: I am making an android game. I want everything to scale to the size of the screen I'm using. Further, my static background needs to scale (as well as every other object), but if the aspect ...
0
votes
0answers
62 views

Google Developer Console Error message

i received my first crash report of on Google Developer Console yesterday and im completely lost. Did anyone receive this error before and how can i go about fixing it? Any help would be greatly ...
1
vote
2answers
168 views

NPC daily routines and scene loading

I'm making a basic survival RPG in Unity 3d. I'm separating my world into different scenes to save memory but I'm not sure how I'm going to program NPC daily routines. For example, if the player ...
1
vote
0answers
80 views

Scripting language for high complex educational game [closed]

I'm at a stage of working at my C++ game that I need to implement a script language to allow the players to perform tasks inside the game's logic. I'm a sole programmer and thus it's entirely ...
0
votes
0answers
64 views

How to embed UnityScript for scripting in Unity3D?

It is useful to have parts of your game being scriptable. Many people (especially outside of Unity) are using LUA for that job. As UnityScript (as with Boo or C#) is a first class citizen why not use ...
0
votes
2answers
298 views

How to reverse gravity in Unity

I'm trying to figure out how script gravity reversal on collision with an object. How can I reverse gravity?
-1
votes
4answers
159 views

Scripting vs Programming [closed]

How does using Scripting and calling functions of scripting API differ from programming using C++ in UDK or Unity?in scripting we use the scripting API to interact with the engine and use functions ...
0
votes
1answer
325 views

Random Object in Array

I am using Unity. I have created eight different types of objects, stored in an array, and I am displaying them on the scene in a grid pattern with random order. The first four objects in the array ...
0
votes
4answers
383 views

Entity Component Architecture and Scripting without using threads

I am working on a small game engine for practicing purpose and also for putting some of my ideas into action. What I have so far is a couple of systems for rendering, sound etc. The next step is to ...
3
votes
5answers
193 views

Scripting APIs and scripting to make games

I am confused, what is scripting and what is scripting API? Is scripting the process of writing the game program? And is the scripting API (as in unity scripting API) the API provided by the game ...
0
votes
0answers
62 views

How do I hook up new spell scripts in Skyrim?

I am currently using this tutorial of making a location-based magic spell in Skyrim. The spell I'm making will place a soil mound on the ground wherever the conjuration ball hits when you shoot it. ...
2
votes
1answer
558 views

How do I change the material of an object with Script in Unity?

I was making a game with Unity and I want to change an object's material using JavaScript when the player collects 5 collectables that I made. The collectables get stored in an int variable called ...
1
vote
0answers
43 views

Scripting Documentation [closed]

I'm working in a game which will support scripting. I have seen that popular games supporting this feature usually ends up setting up a wiki from where one can obtain information about how to script ...
0
votes
1answer
105 views

Shared Material

I have this simple script, so the user touch one of the cubes all cubes with same material will change color. One of this cubes must have the name of the color on it, only one, so the user touch the ...
-5
votes
1answer
96 views

Do total conversion mods require absolutely no programming or scripting skills? [closed]

I tried to look up total conversion and other mods as examples (Counter-Strike, Defense of the Ancients, Gunman Chronicles, Dear Esther, Natural Selection) but it is a bit difficult to find out if ...
3
votes
1answer
800 views

How can I manage entities(in entity component system) using Lua scripts?

Suppose I have a code like this in C++ // Game.cpp Entity* hero; Entity* witch; ... // entity initialization if(/player near witch/) { if(hero->get<HealthComponent>()->getHealth() ...
0
votes
2answers
338 views

Problem with moving player through a secript by a set distance

I am currently trying to add a sort of "dash"-ability to my sidescroller. What I try to do, is to let the player press a key where a simple key-press causes the player to move quickly into one ...
0
votes
1answer
305 views

Unity - Invert Movement Direction

I am currently developing a 2,5D Sidescroller in Unity (just starting to get to know it). Right now I added a turn-script to have my character face the appropriate direction of movement, though ...
1
vote
2answers
1k views

Is it safe StringToHash() to use in Unity?

I'm currently browsing through the Unity tutorials and saw that they're recommending to use Animator.StringToHash("some string") to created unique ids for animation properties (see here). Since I'm a ...
0
votes
2answers
108 views

Using Canvas instead of Scaleform in UDK

I'm working with Unreal Script, and I need to use Canvas instead of Scaleform to create a HUD. I've extended the game type from UTGame, and used bUseClassicHUD in the Default Properties section, but ...
1
vote
1answer
156 views

Is it possible to mod a game to use a scripting language like Lua?

So my questions are: Is it possible to mod a game to use a scripting language? How would I go about doing so? I really like Arma 2 but like many games it does not have much in terms of ...
42
votes
6answers
10k views

How does Lua work as a scripting language in games?

I'm a little hazy on what exactly Lua is and how a game that is programmed in C++ would use it. I'm asking primarily about how it is compiled and run. For instance when you use a program written in ...
0
votes
3answers
183 views

How necessary are shader coders? [closed]

I know that gameplay mechanics programmers, either directly working with source or with scripting are needed, however there are so many shaders written already that I would imagine you could find ...
1
vote
2answers
123 views

Can you adjust the proportions of a 3D model via scripting?

We are developing a game in Unity where the character is different ages in different levels. Would it be possible to use a single 3D model asset, and alter its proportions via scripting to achieve ...
1
vote
1answer
151 views

How to put basic scripting/variable changes into dialog xml files?

I have a simple XML structure for my dialog between the player and NPCs. What I'd like to do is put variable changes (and maybe other things) directly into the XML. So, for instance, if you select a ...
1
vote
1answer
107 views

Creating teams 2v2, 3v3, etc

I'm figuring out how to create games with teams. The problem is that there will be games 1v1, 2v2, and so on as well as free for all. What would be the most efficient way to do this in Unity C#? I'm ...