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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
43 views

When making an object that interacts with things, is it better to have one big script or several different small scripts [duplicate]

Im working on a game inspired by Buckshot Roulette but medieval themed, in Buckshot Roulette the weapon can be picked up by the player, who can then point it at themselves or the "dealer", ...
Ulver04's user avatar
  • 11
0 votes
1 answer
150 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 ...
Bubba the Gamer's user avatar
0 votes
0 answers
90 views

How can I store two different render layers on separate render textures?

I'm using Camera.cullingMask to only render objects that belong to specific layers. However, I can't figure out how to render two different layers on the same frame and store them in separate render ...
Nikhil Nair's user avatar
1 vote
0 answers
59 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 JustOnly 1's user avatar
0 votes
0 answers
118 views

Using Skyrim Creation Kit, how to have an NPC stopped by a guard?

I am making a mod using the Skyrim Creation Kit. At some point in my quest, the Player must steal a statue that I created, then, as soon as it's done, the next stage begins, asking the player to place ...
Yennefer33's user avatar
0 votes
1 answer
133 views

Unknown enum type when modding Minecraft recipes with CraftTweaker

I want to make some new Recipes with CraftTweaker, which uses machines from the Create mod (I'm using Life In The Village 3), but I have the following error in my scripts: ...
Lucas Plt's user avatar
1 vote
1 answer
710 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 } ...
Felox's user avatar
  • 67
3 votes
0 answers
318 views

How can I implement native c++ scripting like it's done in engines like Unreal and Godot?

I've been developing my own game engine and I'm kind of stuck in the process of scripting. I decided to use C++, since my game engine is mainly written in C++. (and don't suggest me other languages as ...
Anuhas's user avatar
  • 31
2 votes
3 answers
2k 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 ...
PayasoPrince's user avatar
0 votes
0 answers
61 views

Get vertices back from shadergraph?

I am making waterwaves in shadergraph and i want to make a boat that will bop around on those waves, but to do that i need to get those vertices back into the CPU. I am unable to replicate those waves ...
BinaryPastaChef's user avatar
-1 votes
1 answer
375 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. ...
fredwriter's user avatar
0 votes
1 answer
2k views

Remove material slot via Unity Script

I have a lot of duplicated objects, and I need in editor, not in the game, remove specific (18) material slot. Remove not material in slot 18, but remove slot 18. Manually, by hands, it can be done ...
Stdugnd4ikbd's user avatar
0 votes
0 answers
104 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 ...
Doug Ray's user avatar
  • 143
0 votes
1 answer
138 views

Scripting Language To Renderer Architecture

I am currently designing the scripting side of our engine. The idea is an entity-component system. That means most of the coding is done via jobs. The language we are using is compatible to C. The ...
broken-bytes's user avatar
-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 ...
Dalsha's user avatar
  • 1
0 votes
1 answer
89 views

How can I make a menu item that splits animations based on a text file?

I want to split all the animations inside a FBX by using a .txt file which contains start times and names for the animations in this FBX. I found a script that does exactely that here. However, this ...
tmighty's user avatar
  • 919
0 votes
1 answer
155 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. ...
spatial's user avatar
  • 101
0 votes
0 answers
111 views

Rotate 3D object relative to the camera

I really need the help of an expert. I'm trying to rotate an object in all 3 axes relative to the camera in response to the gamepad sticks. I have succeeded but with an unexpected error, depending on ...
Gabriel's user avatar
0 votes
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 ...
Norbert's user avatar
  • 121
2 votes
3 answers
2k views

Best practice for giving properties to game objects

I'm not a noob in Unity although not the most experienced one, but during one of my project a noob question came to my mind! Strange but this never was an issue for me during my old projects... I ...
BushWookie's user avatar
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 <...
Tanmayee Pathre's user avatar
3 votes
2 answers
165 views

How to Iterate thru game object and access scripts by name?

I'm using a "toggle visibility" script on many objects in my scene, and in my gameController class I'm storing references to them in an array like this: <...
karl's user avatar
  • 33
0 votes
1 answer
128 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 ...
Amanda's user avatar
  • 1
0 votes
0 answers
59 views

Unreal Engine custom camera

I was looking at game engines and found Unreal Engine. I want to make a game where the player has to create a camera by crafting it and can customize how many pixels the camera detects and what the ...
dogking57's user avatar
0 votes
1 answer
57 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 ...
Matheson's user avatar
0 votes
2 answers
2k views

How to save boolean to player prefs in Unity?

I'm making a player settings thing where the user can turn off or turn on the game music by clicking buttons. I had this script below and everything was working fine. ...
Matheson's user avatar
3 votes
1 answer
97 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 ...
Apollo Johnson's user avatar
0 votes
1 answer
2k views

Cannot implicitly convert type 'UnityEngine.Vector3' to 'Vector3'

I've defined an abstract method in an abstract class with a generic return type. However, when I try to use the generic type as a Vector3 (or any other variable) I get this error : Cannot implicitly ...
Venay's user avatar
  • 207
0 votes
0 answers
84 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 ...
Object's user avatar
  • 289
0 votes
1 answer
337 views

Is there a way to setup a notification from Unreal Engine when it finishes packaging / building my game?

In Unity I was able to use a post build script to send myself an email when Unity finishes building a game. Is there a way to make a script run when Unreal Engine is done packaging a game? Or any ...
Jorge Luque's user avatar
0 votes
0 answers
40 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 ...
Faih Faih's user avatar
0 votes
0 answers
188 views

script execution order on changing scene

In script execution order , i set A start first before B , and B start first before C . So normally the script execution order should be A -> B -> C C is already loaded on scene 1 without the help ...
user6668201's user avatar
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: ...
Ronnie Lightweightbaby Coleman's user avatar
0 votes
0 answers
46 views

How to move an object while the animation is going on?

I added a jump animation with the character in unity and to move the character I have some code like this: ...
Jacob Frye's user avatar
0 votes
0 answers
320 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 ...
Ian Young's user avatar
  • 2,649
0 votes
2 answers
319 views

Disabling RigidBody component

I'm trying to create a mechanic in my puzzle game in which if the player clicks on one of the flying game objects, the object's gravity would be enabled and world physics would be applied to it. ...
GamesWerfer's user avatar
2 votes
1 answer
314 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 ...
GamesWerfer's user avatar
1 vote
1 answer
238 views

Saving precomputed data about game objects in Unity3D

In my Unity3D game I have blocks of the environment that are placed by script into the scene. Each block has some bezier paths created with this asset. I can access all points of the paths when I ...
Jakub Petriska's user avatar
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. ...
user avatar
0 votes
0 answers
92 views

Why do these textures tile rather than just overlap?

It might help to provide all the details, so here is the YouTube tutorial which sparked my question. There's a prefab of the background tile called "Tile Background." This prefab has the default ...
Somniad's user avatar
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 ...
Charanor's user avatar
  • 7,840
0 votes
2 answers
351 views

How to make extendable Mario warp pipe in Unity?

I want to make a warp pipe from the Mario games in Unity. The key feature of this object will be that I can set the length (height) of its "neck" to any length I require, as long as it is greater than ...
hatinacat2000's user avatar
0 votes
0 answers
35 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-...
DustyShinigami's user avatar
0 votes
0 answers
208 views

Godot: Using an argument's methods as kwarg

I downloaded and tried out the Rakugo addon out of the box and I ran into this problem: 'Parser Error: Identifier 'node' is not declared in current scope' If you look you can see that node is an ...
Kennichi Nitta's user avatar
-1 votes
2 answers
669 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 ...
FSic's user avatar
  • 176
0 votes
2 answers
4k views

How to detect whether a transform has rotated left or right

I have a game object in my scene, and I want to know how can I calculate whether this game object rotating to the right or to the left. For example : ...
iman_sh's user avatar
  • 175
0 votes
1 answer
241 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 ...
Dan Howe's user avatar
1 vote
1 answer
792 views

Best C# technique to pass variable from Instantiated object to GameObject

There are lots of instantiated prefabs. Info from it is transmitted while it crosses a trigger zone. Some of these are calculated custom variables. I can print the custom variables from the ...
ScumSprocket's user avatar
1 vote
2 answers
2k views

Adding a dodge roll. Unity

I'm a newbie here. I need to add a second collider in CharacterController in the separate script with possibility to enabling/disabling them. I tried to find answer how to do it but I find nothing. ...
Hyperka 's user avatar
0 votes
1 answer
110 views

Visual Studio can't handle my unity scripts

I have created a new project in Unity 2018.3.4f1 with Visual Studio Community 2017. I can't edit scripts properly in Visual Studio because of a bunch of errors related to .net framework. How can I fix ...
Random generalist's user avatar

1
2 3 4 5 6