Skip to main content

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
2 votes
2 answers
3k views

I'm making an engine in C++ with Lua for its scripting language (using LuaBridge as the binding). I have a lot of entities and those entities have components. One of the components on those entities ...
khofez's user avatar
  • 95
1 vote
2 answers
611 views

I am making a game which has around 25 prefabs. I want to generate these prefabs randomly one after another and also I am destroying the last prefab. One way is to make an array of gameobjects and ...
swap96's user avatar
  • 11
0 votes
3 answers
2k views

I saw this question and was hopeful to find the answer to my question, but no such luck: How do I make someone walk in Skyrim? I want to, using papyrus ONLY, make Actors that I spawn to travel/patrol ...
user3505708's user avatar
2 votes
1 answer
239 views

I recently turned my practice project into a match3-type game. The game uses a 6x10 grid, internally stored into a single array, with each item being a positive integer (0-based). I have a function ...
F8bit's user avatar
  • 33
0 votes
3 answers
18k views

I wish to build a simple game in Unity such that the objects in the game can be controlled via a Python script (or a code in any other programming language). Is this possible? If yes then how? If no ...
ironstein's user avatar
  • 121
2 votes
2 answers
3k views

I have a script that I want to run before any other script. I want to change its execution order settings. I could do that using the Script Execution Order Settings option from within Unity, but I ...
Evorlor's user avatar
  • 5,881
-1 votes
1 answer
659 views

This is my scenario: I have a 3D model of a house, and an autonomously moving robot moving through the house picking up multiple objects. I have an array of 3 objects I want it to pick up, but I don'...
juuljuup's user avatar
0 votes
1 answer
92 views

I have a 3D model of a house, and I want an autonomous robot to move from 1 object in this house to the next one. I have it moving to the first, but it won't move to the second one. This is my code: <...
juuljuup's user avatar
0 votes
2 answers
185 views

This question falls in line with my last question: Unity 3D - create autonomous moving robot in house + first person camera movement What I have I have a 3D model of a house; a first-person camera ...
juuljuup's user avatar
1 vote
1 answer
14k views

So I'm working on a simple drag-n-drop based trading card game for my own amusement. There is a card inspector included. What I want to achieve is to change values in the inspector (which has its ...
spartai's user avatar
  • 53
-1 votes
1 answer
1k views

I have very, very little knowledge about programming or Unity. I have done some basic tutorials, but I want to try something harder. The thing is, I don't know where to start. If you find the time to ...
juuljuup's user avatar
0 votes
1 answer
862 views

How can I switch cameras from First Person to Third person or from thrid person to first person. Like at GTA V you can switch the cameras. How to do this? Tnx for your time.
Mordechai Hadad's user avatar
0 votes
2 answers
127 views

I have been struggling with this NullReferenceExpection error. When I don't add anything and just use this version of the code. The game adds a tower, upgrades a tower and takes money for it. It ...
SleepySleeper's user avatar
5 votes
1 answer
5k views

I have finally completed my game and ready to upload my game to the App store, but my build size is too large. I have checked log statement and it is roughly 13.3 mb but when i build my game and test ...
user3191102's user avatar
-3 votes
2 answers
304 views

I wonder if its possible to use Java as a scripting language in unity to create a basic 2d game?
DevX's user avatar
  • 1
2 votes
2 answers
9k views

I created a custom actor: BPTest.h: ...
arthur.sw's user avatar
  • 311
3 votes
1 answer
3k views

I come from Unreal, still using it. There, how it works is like this: Let's say you as a player have a laser gun or something, and when shooting, you use raycast to see if you've shot anything, and ...
name's user avatar
  • 31
0 votes
1 answer
499 views

When i make a script that excecutes at the beggining and has a var ammo and that finishes excecution, will i be able to call the var ammo in other scripts or it will be deleted? If it will not be ...
Panagiotis Iatrou's user avatar
1 vote
1 answer
931 views

I was playing with the example scenes provided by the Core Assets pack. Everything was working perfectly in Unity 5.3.2f1 until I opened the PinchingSandbox scene and added two script components to ...
Frikster's user avatar
  • 121
0 votes
1 answer
2k views

I'm a complete beginner in Unity 3D, and I'm following a video training. In the video the instructor uses the following code to open a door using raycast: ...
adamasan's user avatar
  • 103
6 votes
0 answers
197 views

I would like to make C++/Lua combo and write scripts for a game with live script reloading. What design patterns should I be aware of so not to cause me unnecessary pain? For example if I have a ...
lukas.pukenis's user avatar
1 vote
1 answer
213 views

I'd like to ask you, since most of you have some or a lot of experience in writing games. What is your approach to running scripts and saving game state when script is executing when there is a chance ...
Jędrzej Dudkiewicz's user avatar
0 votes
1 answer
105 views

I've this script in UNITY to check if the hit RayCastHid2D variable has some gameobject with hole tag or a parent gameobject ...
jamius19's user avatar
  • 307
1 vote
0 answers
3k views

So basically I have a scene in the Unreal Engine which has multiple cameras within it, the cameras are intentionally static as the application should behave more like a viewing gallery than a game. As ...
Enchanter's user avatar
5 votes
2 answers
1k views

I am running an experiment in Unity 5 to see the effect increasing the particles of a particle effect has on FPS over time. (this is background work for a much larger piece of work). Currently I write ...
CH99's user avatar
  • 563
1 vote
1 answer
226 views

I have a questions about how to better implement resource management when integrating with Lua. I have an entity system that has gameplay logic done in Lua. One of the design points was that I wanted ...
PatrickB's user avatar
  • 1,223
2 votes
2 answers
409 views

I appreciate the answer to this question might be a little too broad for SE, but hopefully someone can point me in the right direction. I'm developing a small scripting language for use in my game ...
Triforcer's user avatar
2 votes
1 answer
142 views

I want to work on sound in games, but I don't have any experience in scripting, only in sound design for film. Some friends that do know scripting are starting to learn in Unity 5, and my part would ...
lakistrike's user avatar
1 vote
1 answer
2k views

I'm trying to hook lua-scripts to my entities, where several entities of the same type want to use a separate instance of the same script. Problem is, when I run two or more scripts and use any C-api ...
Bentebent's user avatar
  • 465
1 vote
0 answers
130 views

I have a player who i control with tilting. Also i have some game objects (something like ground or areas where player can not move). The problem is that if these objects are too small the player can ...
chunk1ty's user avatar
4 votes
1 answer
786 views

In Construct 2 example about creating an animated player, they used more than 8 events: 4 events to store movement direction into Direction variable from ...
Dims's user avatar
  • 161
0 votes
0 answers
918 views

In my game, I Instaniate several of the same prefabs for a group of player controlled characters. The prefab contains child objects with particle systems attached. For example one of the particle ...
GeoJohn's user avatar
  • 339
1 vote
0 answers
49 views

So I am going to work on a Java game and recently my friend suggested I use a scripting language to help development go smoother/faster. so far I used XML as data storage and to make the HUD/UI but ...
Angel Flores's user avatar
6 votes
3 answers
410 views

Often, a game is split into engine code (i.e. C++) and scripts (i.e. Lua). Which parts / modules of game code should typically belong to engine, and which should belong typically to script-domain ...
komorra's user avatar
  • 213
1 vote
1 answer
1k views

I have a sprite sheet like this: I am using Unity Engine to develope my game. I would like to load this external spritesheet outside and slice it as Grid type programmatically instead of using ...
Vin's user avatar
  • 13
0 votes
2 answers
6k views

I have a ball positioned as Vector3(x, x, x). I was able to get the direction of the ball to the mouse clicked position with: Code (csharp): ...
mirzahat's user avatar
  • 287
1 vote
1 answer
450 views

I've been debugging an issue where when my player is moving forward at high speeds (I have configurable movement modes for an overview/overwatch mode) if they are in walk mode and hit a steep slope ...
Miguet Schwab's user avatar
0 votes
2 answers
184 views

I want to realize space game on Unity3d engine. There are some huge spaceships in the void. So, I want players flying in space in weightlessness, but when they go inside any spaceship, they will be ...
Dmitriy's user avatar
2 votes
1 answer
415 views

There are some engines that can be scripted with different languages than that of which the engine, itself, is written with. How does that work?
Meeesh's user avatar
  • 223
1 vote
1 answer
460 views

I have three scripts: Level - Represents a Tile Based level. LevelEditor - Custom Editor for Level. Tile - A non monobehaviour class for storing tile information. Level contains an array of Tiles ...
John's user avatar
  • 13
18 votes
4 answers
3k views

Consider a card game, such as Hearthstone. There are hundreds of cards that do a wide variety of things, some of which are unique even to a single card! For instance, there is a card (called Nozdormu)...
Raven Dreamer's user avatar
5 votes
3 answers
273 views

Context: I'm making a little "program your robot army" sort of game in Java in which the player writes Lua scripts (which are then run by LuaJ) to program their robots to do stuff. So far there are ...
Max's user avatar
  • 316
1 vote
0 answers
859 views

I am looking into developing a game, but I am very interested in the more abstract concepts such as modding. I would like to know, or get linked to information detailing the prerequisites, ...
Zac Shepherd's user avatar
0 votes
3 answers
9k views

I am learning some of the basics with Unity and am running into calling/sending code to a different script. For example, the code below is a basic menu of options. I have a different Scene set up in ...
user68995's user avatar
0 votes
1 answer
182 views

I added the kinematic equations to my code and now none of it works. I get the error rigidbody.torque assign attempt for 'Enemy' is not valid. Input torque is { 0.000000, NaN, 0.000000 }. ...
Matt A. Draft's user avatar
0 votes
1 answer
421 views

For some reason, my slider and audio resets back to 0 when I stop and play the game after I changed the value. Here is the code, I can't spot anything wrong with it: ...
user68099's user avatar
1 vote
1 answer
1k views

I have not use playerprefs before, I want to know how to keep the change of the audio when the player change it throughout the game.
Bob's user avatar
  • 127
-1 votes
1 answer
118 views

I got my code right here: ...
Bob's user avatar
  • 127
-1 votes
1 answer
452 views

If I don't attach the Script to the Object, will be the code able to "see" the object? When I need to manipulate (such as enabled() or a transform()) two or more Objects, do I need to attach the ...
Vinicius Coelho's user avatar
0 votes
1 answer
658 views

so My problem is a bit weird. I have a model that will not fall at the correct speed. She falls incredibly slowly. This is the only script attached to her, and I did the "Scale to large" test by ...
Matt A. Draft's user avatar