0
votes
1answer
39 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 ...
0
votes
2answers
166 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 ...
1
vote
1answer
91 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
99 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 ...
4
votes
1answer
449 views

How to store and parse story actions in XML

I been working on a game in Unity that reads its story (Actions, scene descriptions, NPC's, ect...) from an XML and have been wondering there was a better way to store actions based on player data ...
2
votes
2answers
4k views

Unity3d NullReferenceException: Object reference not set to an instance of an object

I'm making a script to climb ladders in my game. These are the variables used in the function. private Vector3 climbDirection = Vector3.zero; private Ladder currentLadder = null; private bool ...
2
votes
1answer
172 views

Implementing a wait function in a game script

I have been implementing behavior for enemies in my game and so far I have been doing it sort of like below: public void update() { if (frame > 60 && frame % 30 == 0) { ...
2
votes
1answer
313 views

Game Development AI, NPC & Entities Definition using Scripting Languages

i am developing a Multiplayer(actually MMORPG) architecture for learning purpose. I do have some game developement background, but all my engines were very rigid and completly developed for the game ...
3
votes
2answers
793 views

Playing different particle effects in Unity on the same ParticleSystem

The question really sums it up: What is the best way to use one particle system for playing different particle effects? The scenario: GameObject is picked up and it starts playing a simple indicator ...
3
votes
2answers
3k views

How does Unity use C# as a scripting language?

To my knowledge, thus far, I have thought that C# is and has always been a compiled language. I have recently started studying Unity3d and noticed that they give C# as an option for scripting and ...
2
votes
2answers
162 views

How might I script the creation of CLR objects?

I am looking for a method to script the creation of entities (arrays of components) for delivery through my entity factory, i.e scripted creation of .net objects. I have looked into Lua but it seems ...
0
votes
3answers
294 views

c# scripting execution with xna (actions take more than 1 frame)

I'm trying to figure out how to implement c# scripting into my game (XNA with C#). I will be using C# as the scripting language. My question is, how to call functions that take more than 1 frame to ...
2
votes
1answer
725 views

Scripting for a C#, multiplayer game

I have a multiplayer game written in C# and we've recently been creating a lot of content but have been looking for a way to give our entities customization logic that the designers can hook into. I ...
3
votes
2answers
4k views

Where to attach global scripts in Unity?

As far as Iknow in Unity, every script must be attached to an object. But what is the case with global scripts? For example in a tetris-like game to which object should I attach the element spawner ...
0
votes
1answer
172 views

Syncing properties across a game server

I'm beginning to implement a simple scripting system into my networked server, and I've hit a snag. Before, I've been wrapping my calls into functions on objects that manipulate objects, but lately ...
3
votes
0answers
539 views

Any recommended books/resources on component-based design? [closed]

I come from a background with heavy use of the classical object-oriented paradigm for software development. The company I am a part of switched to Unity not too long ago, and we're all very excited ...
2
votes
1answer
283 views

Scripting: Loading all scripts at runtime vs loading scripts when needed

I'm using Boo as a scripting language in my C#/.NET game via the in memory compiler with it and I really love it, however I'm having trouble deciding when I should load my scripts. This is my first ...
1
vote
2answers
904 views

How do you make game objects (enemies, NPCs) move in interesting, non-linear ways? (e.g. shoot 'em up enemies)

I'm using a series of easing equations to make menus and transitions a little more interesting in my first game. That got me thinking about how game objects (enemies, NPCs, spaceships, whatever) are ...
7
votes
1answer
1k views

How do I communicate with an IronPython component in a C#/XNA game?

My XNA game is component-oriented, and has various components for position, physics representation, rendering, etc, all of which extend a base Component class. The player and enemies also have ...
10
votes
2answers
1k views

Handling scripted and “native” components in a component-based entity system

I'm currently trying to implement a component-based entity system, where an entity is basically just an ID and some helper methods tying a bunch of components together to form a game object. Some ...
9
votes
2answers
3k views

What are the pros and cons of Lua vs. Python as a scripting language for XNA/C# platform?

I am thinking about giving a go to one of my ancient ideas for a game. The core point of this game would be the possible level of functional customization of the game environment and objects (such as ...
16
votes
4answers
1k views

Game engine: a decent way, architecture-wise, to implement scripting support?

I am developing a simple game engine (in C#, if it matters), and I can't think of a decent enough way to implement scripting in terms of architecture. It's a simple turn-based strategy with custom, ...
9
votes
2answers
4k views

Scripting engine for XNA

Say I'm making this big game in C# with XNA. What options do I have to include a scripting feature to my code base?