Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
26 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 ...
-1
votes
2answers
183 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
0answers
15 views

Changing controls in a new scene

I currently have a 2.5D platformer in the works for a college project, and the character can be moved with left and right. However, when entering a particular new scene, I want the character/player to ...
0
votes
2answers
37 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 : ...
0
votes
1answer
24 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 ...
1
vote
1answer
71 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 ...
0
votes
2answers
125 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. ...
0
votes
0answers
14 views

Scripting | Logic/Workflow problems

Im trying to make a Character controller, but I have some problems. I have a principal script where is the movement with velocity, and the jump, also there is a bool for when he can move or not. The ...
0
votes
0answers
8 views

How to control kinematics articulations via GDScript?

I have seen that Godot only plays an "animation", that is, it only executes the sequence that was pre-defined in the file (for example, a DAE made in Blender). For example, a rigging of a hand with ...
0
votes
1answer
46 views

Resize game object using single drag handle using Unity

Really need your help. I'm trying to create a custom controller for my app to allow users to resize and rotate game objects using a single drag object. I was able to create the code to create the ...
0
votes
0answers
8 views

Controls don't work when parent or target moves

I have a platform for catching a ball. Platform physics material has bounciness value of 2 which pushes ball twice high from compared to its original position. Camera and platform have scripts ...
0
votes
1answer
50 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 ...
0
votes
0answers
38 views
0
votes
0answers
23 views

Rendering fibres in Unity

I would like to make this is Unity. How to to setup the script so that Unity could render such with gradient color/material as fibres? https://portsmouth.github.io/fibre/ ...
0
votes
1answer
207 views

Name doesn't exist in current context in Unity

I'm currently making a collectible heart in unity, the kind that updates your health bar when you collide with it, and I made two scripts: This one is called 'healthmonitor': ...
-1
votes
2answers
68 views

UNITY || How to access the “exit transitions” of the current played clip from the animator?

So, I have an animator , i can access it. But from there I have no idea how to access the clips inside. I need to access the transition of the clips. I got as far as accessing the object of the "...
0
votes
1answer
116 views

Walking around a sphere in Lumberyard

I am trying to create a simple game using Amazon Lumberyard and my goal is to have levels/stages where the player will be able to walk around a mini planet. I have seen a lot of tutorials about this ...
-1
votes
1answer
153 views

Converting code to work in godot with sliders

I have some Fragmentarium code that I would like to convert so it will work in Godot anyone have any ideas how I can do this? The code is below: ...
0
votes
1answer
32 views

How to dynamically construct a reference to a game object by name

I have game objects tagged MenuOption0, MenuOption1, MenuOption2, etc. I want to keep a currentIndex var, which gets incremented each time the user swipes on the controller. That swipe should ...
0
votes
1answer
122 views

How to parent object to empty when looked at

I am making a fps in unity. I have an empty parented to the camera for the gun, and I want to be able to pick up and drop guns found in the scene. Does anyone have a simple c # script that would allow ...
2
votes
1answer
208 views

Are abilities in online games better crafted in the main game backend language or a scripting language? [closed]

Scourge Healing: Hex Spell. (30 seconds.) Whenever target foe is healed, the healer takes 15...67...80 holy damage. The above is one of Guild Wars 1's monk class skills. My question is about what ...
0
votes
1answer
143 views

Changing coordinates of the object with velocity preservation

In Doodle jump, if a player jumps over one side of the screen he appears on another side with preserved velocity and other physical parameters. I made two trigger colliders on the sides of the ...
2
votes
1answer
174 views

Redistributing sprites in procedural generation according to player movement

I am making space arcade with procedurally generated background consisted of nebulas and stars sprites, which spawn on Awake() in certain borders around player. Mobile phones have limited capacity ...
0
votes
1answer
200 views

Procedural generation background works with one type of prefab and doesn't work with another

I have background generation script with 2 arrays. One contains stars prefabs with sprites and another contains nebulas prefabs with sprites. Both have identical types of variables as generating ...
0
votes
1answer
150 views

Locking value when creating tweaking dependent values

I have several values which adjust them self In Unity Inspector when I tweak one of them. So total sum of these values stays constant. (which is 100 as 100%) Sometimes it is hard to get specific ...
0
votes
1answer
151 views

Creating dependent values in the Unity inspector

I want to create a few values which will be dependent on each other. Specifically, I want total sum of few values always be 100 In unity inspector no matter how I tweak them. E.G.: ...
0
votes
1answer
448 views

Changing texture offset in unity by script

I am trying to change texture offset in a material by a script to create a parallax effect, but it doesn't move a bit no matter what I am trying. Any tips for this case? Or am I missing something?
1
vote
1answer
70 views

NavmeshAgent not to turn back

Imagine the blue part of this picture is streets and navmesh. the red object is a car with navmeshAgent. the green circles are the colliders set as triggered and they are the destination of the car. ...
2
votes
1answer
168 views

How do I implement a JavaScript interpreter into a C# game?

I'm trying to create a hacking game where players design programs and hack other people's stuff. Users write their programs in JavaScript. I'm aiming for a hackmud-style system, where user programs ...
1
vote
1answer
64 views

Camera Linecast Bumper Stuttery

I copied a script off the internet and changed it a bit: ...
1
vote
1answer
115 views

how to control units in a game using scripts

I'm looking to create a game like screeps, in which the user controls their units using javascript. I am planning on using lua as the scripting language that controls the units in my game, as it is ...
1
vote
3answers
397 views

Binding c++ templated functions to lua

I have started using Lua as a scripting language for my game engine. It works perfectly for things like input, audio etc. However, I'm now trying to bind my entity component system functions which ...
-3
votes
1answer
998 views

How to start a Coroutine in another script?

I did some research about this but what i found was kinda confusing so I didn't actually understand it. Basically I have a coroutine that displays an image after 5 seconds, but I want that image to ...
-1
votes
1answer
999 views

An object reference is required to access non-static member

I have a code that I want to use to change levels everytime the player kills a certain amount of enemies, but it gives me this error: An object reference is required to access non-static member `...
0
votes
1answer
118 views

How do I draw two lines of text in GMS and keep one static?

I am making an intro sequence for my game, but I'm having some difficulty drawing two lines of text. The first line is "DEVELOPED BY:" referenced from a separate language file as "IntroSequence", "...
1
vote
1answer
57 views

Admob for Unity: clarification on use needed

I'm following this documentation by Google on how to integrate Admob ads into my game and I'm confused because of the following: This documentation says I build by game and then I mess around with ...
0
votes
1answer
181 views

Unity dictionaries having duplicate keys

EDIT: Restarting Unity solved the problem! ;) I don't know if Unity and GameObjects have anything to do with this, but I am getting a strange duplicate Key error while scripting in Unity. ...
2
votes
1answer
41 views

Spawn system not working correctly

I try to spawn one or two obstacle at the same time given the position rightpos, midpos, and leftpos but i keep getting the spawn position to only rightpos and midpos. ...
2
votes
2answers
1k views

Use Python scripts in my C++ game? [closed]

So I have this game project which is going very well for now. I implemented OpenGL stuff, animations, interfaces, and a lot of very nice things that I'm glad I've finally gotten around. So now that ...
0
votes
1answer
52 views

Method for Modifying Numbers based on Attributes in a Game [duplicate]

A game that I'm working on in Unity has a diverse set of spells. The player character and NPCs all use an attributes which modify these spells in different ways. Our design is very fluid and the ...
0
votes
1answer
87 views

Is allowing the server to remotely execute code on a client a security risk?

My game uses scripts that can be edited by the player and I'm trying to figure out how to handle multi-player, while still allowing custom scripts. What I am thinking about doing is having the server ...
0
votes
1answer
3k views

Event Trigger for sprite not working

I have set up a script to set game objects as active/inactive depending on a particular number representing the index of a gameObject array. As you can see the image below. I have two buttons as shown ...
4
votes
0answers
91 views

Scoreboard setdisplay list shows correctly per char. Can i make my sidebar show correctly per char as well?

So I've been writing a script over the last little while in Python that interacts with the Minecraft console. I'm basically trying to make a scoreboard based currency system that is world independent ...
1
vote
1answer
468 views

Instantiated objects sharing the same animator cannot animate independently?

I have two scripts and an animator. The first script is attached to an empty gameobject and creates eight plane (for use as cards). The second script runs a flipping animation if the plane/cards are ...
0
votes
1answer
1k views

All scripts in Unity game can not be loaded

I can not provide a "why" here, because as far as I can tell it happened spontaneously - after saving an edit to one of my scripts, it just started happening. But here's the problem: Every single one ...
3
votes
3answers
5k views

How to make Unity game moddable with scripting in a friendly way?

I am building a game in Unity using C# and visual studio. I want to make it possible for users to write code in some scripting (for modding purposes) without necessarily opening the source. What are ...
1
vote
1answer
356 views

Getting player cube to move left or right in relation to camera based on camera's rotation

Right now I'm trying to make the player cube move left, right, up and down in relation to the camera's rotation and position. I figured what I could do is create an empty game object, make the main ...
1
vote
2answers
2k views

Array but with a name for every element (value)

Say I have 10 different types of grenades, I would like to create one variable, to allow me to set the number of grenades given from the inspector, I could create an array with 10 integers and set the ...
5
votes
1answer
314 views

How do game makers (without coding) work?

How do game makers/engines like Buildbox, GameSalad, Construct, GameMaker, etc work? What technologies (programming languages, APIs, etc) are used to build the and how does the program convert the ...
0
votes
2answers
3k views

Input.GetKeyDown need to press button more than once to work

So in Unity3D I'm checking for Input.GetKeyDown(KeyCode.E) for stuff like pickups and opening doors. Sometimes it doesn't work the first time I press it and I must ...