Skip to main content

Posts

Showing posts with the label functions

Materials and Textures Blender 2.57

Adding materials and textures is an important aspect of creating models and characters.  I'm sure that some of you  (like myself) add a texture to a model and it didn't apply.  This will be me showing you how to add textures and designs to objects.

Blender Hot keys and Using Blender

This will show you how to use Blender and also the hot keys.Hot keys are very important (and simple) in Blender.  They make navigation, distortion, editing, toggling, and other things much easier than if you were to search for each individual function on the software.  I'm going to go over most of the hot keys and their functions.  (This is for Blender 2.57, hot keys and functions listed below may not work/coordinate correctly with older or newer versions of Blender)

Referencing another script..

So, here's how it's done. function addingExp(){     var level = gameObject.Find("Player").GetComponent(Level);     level.experience +=50; } Explanation: gameObject.Find("Player")  Finds the object the script it attached to. Player is the name of the object, note that the name has to be in quotations. GetComponent(Level) Finds the name of the script. level.experience +=50; level is calling the variable that we just set above, experience is a variable within the script that were calling on in the code.

Making Classes..

A dip into JavaScript. Before I begin. var is a variable. You need to declare your variables before you start writing code so the code will execute properly. Declaring a function goes like this: function Update(){ //Insert your code here.... }