Questions tagged [scripting]
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 compiled, and thus they can be executed directly without generating machine code.
272 questions
0
votes
1
answer
111
views
OnTriggerEnter called without a Rigidbody
I use Unity and the player controller in the game is acting strangely. It has a Character Controller but no Rigidbody. I use CharacterController.Move to make him ...
0
votes
1
answer
208
views
Roblox Studio: Holding down LeftControl as an in-game keybind activates Roblox Studio Shortcuts
I've been making a small experience within Roblox Studio recently and wanted to add crouching into the game. I used my (already functioning) code for sprinting and modified it to make a crouch button ...
0
votes
1
answer
481
views
In my Roblox Tycoon game, my button is not working
I am a rookie at Lua and Roblox Studio in general. I am attempting an easy and reasonably simple tutorial on how to make a pretty good looking tycoon game. In my "Core" script, I am ...
1
vote
0
answers
77
views
Is it Possible to use Python that is installed from the NuGet Unity Package Manager, for all platforms in a Unity game project?
Hi I've installed NuGetForUnity that is a Unity package to my Unity game project from the url: https://github.com/GlitchEnzo/NuGetForUnity/tree/master and there are so many NuGet packages are ...
1
vote
1
answer
998
views
Map arrays of game objects to values of an enum in Unity inspector
I want to have a serialized field with an array of game objects for each item in a global enum, like this:
public enum MyEnum
{
Item1,
Item2,
Item3
}
...
2
votes
3
answers
5k
views
Resize Sprite To Match Screen Size
My game's resolution is 1920 x 1080, and I have a background sprite that is also 1920 x 1080. I have made the background sprite a child of my MainCamera & dragged it further back on the Z-axis so ...
-1
votes
1
answer
553
views
Event Click Mouse Button to 3D TextMeshPro
Im create TextMeshPro from "Create -> 3D Object ->Text - TextMeshPro"
How to receive mouse button click event for TextMeshPro?
I tried via Physics.Raycast/Collider but it doesn't work. ...
0
votes
0
answers
144
views
Moving Camera with script
Hey all I am trying to make a scene where the player is experiencing a plane crash however when I try and move the camera with transform. Translate the camera is not moving. The plane moves along as ...
-1
votes
3
answers
2k
views
Cannot drag GameObject into exposed field in the Inspector
I followed the Brackeys' How to make a health bar tutorial on YouTube, and it worked perfectly when playing around with the sliders myself. But, when I tried to drag the health bar object into the ...
0
votes
1
answer
196
views
Would creating a player scriptable game using Unreal Engine or Unity violate their license agreement?
I want to create a game in Unity or UE4 which allows the user to write scripts in Python and run them mainly to control the AI. I will have to find a way to enable runtime script execution first. ...
1
vote
0
answers
1k
views
Loading external file data into Scriptable Object in Unity
I've been at this for two long days, trying to figure out a way to handle saving and loading data for a mobile puzzle game I'm working on. The game has level packs and each level pack has multiple ...
1
vote
1
answer
2k
views
Difference between methods - onClick.AddListener and On Click under UI button inspector?
Within my Unity Project in my code, (see below), I have a button called Check which executes when CheckPress() function is called. I read two approaches by which this can be done.
Appraoch 1: Using <...
0
votes
1
answer
149
views
Using coroutines and texture array for talking animation?
I was thinking of having random textures from a texture array being chosen every 0.5 seconds through a coroutine to imitate talking if something like talking=true. Not sure how I could set this up and ...
0
votes
1
answer
103
views
Need help accessing booleans from other script Unity3D
I'm making an endless runner game where platforms move towards the player so it makes it seem like the player is running across them. I'm trying to make it so that when the player dies, the platforms ...
3
votes
1
answer
126
views
How to store data and behaviour for what happens within a level?
I made a game a year ago featuring a custom scripting language, but I realised that it took far too long to actually make the language and there were many commands that were very rarely used.
I'm ...
0
votes
0
answers
111
views
How to change a float variable from another script based on distance to it
This is technically 2 questions but I may as well kill 2 birds with 1 stone. In my game I want the cameras glitch filter effect to increase the closer it is to a gameobject. I have tried achieving ...
0
votes
0
answers
45
views
Whats the best way to make my Unity game moddable? [duplicate]
Basically the title. I'm building a game with several NPCs and complex systems, and I want it to be nice and modular for modders right from the beginning. So far, I have looked into:
Asset Bundles, I ...
0
votes
1
answer
1k
views
In unity C#, why use the .SetBool(booleanname, boolean) command when you could just write 'booleanname = true'?
I noticed on a tutorial for unity someone used the code:
private Animator animator;
private bool isRunning = false;
While further on, did:
...
0
votes
0
answers
375
views
How to support JS/Python scripting a C++ game engine?
I'm currently writing an Entity/Component/System architecture game engine in C++, and I have the beginnings of a lua scripting system in place, which seems to be quite popular, but I feel Javascript ...
2
votes
1
answer
330
views
Unity Jumping bug
I'm working on a basic movement system for the player in a 3D Box platformer and for a month I've been having problems with the double jump system. The one bug that I still can't figure out is ...
2
votes
1
answer
4k
views
Updating transform position after root motion
I have an animation of a character climbing with root motion in it (i.e. the character moves generally upwards for a couple of units during the animation). It is intended as a one shot, not a loop. ...
9
votes
2
answers
2k
views
User-friendly scripting when using an ECS?
I am currently creating a small hobby project to get back into game development, and I have decided to structure my entities using an ECS (Entity Component System). This implementation of an ECS is ...
0
votes
0
answers
55
views
Unity - referencing the player's renderer
I have a bit of a problem with transferring my Game/Health Manager across scenes. My current Health Manager is set up so when the player gets hit, they flash, which is controlled by activating and de-...
-1
votes
2
answers
739
views
Sebastian Lague's A* star pathfinding "On condition"
As the title suggests I have been following the wonderful series of tutorials dealing with pathfinding made by Sebastian Lague.
My problem is that the code is meant to be working immediately after ...
0
votes
1
answer
449
views
Text on touch in Algodoo
I have just started off in Algodoo and have only a basic knowledge of how it works.
I want to be able to create something that when it is touched by a ball with an English flag on, it shows England ...