Hey,
Unity uses C# and Javascript.
Javascript is VERY easy to use, and really... In my opinion, you could do fine just be going from the examples on the API.
API: http://unity3d.com/support/documentation/ScriptReference/index.html
So, I'd suggest, thinking of things you need, and break it down...
So, for a RPG. Um, how about we go with the killing system... So, if you want it to right click on an enemy, and kill it, your player automatically walks over, and starts to attack it.
So, break it down.
You need health. You need damage. You need input from the right click. You need to check if the right click was on a resource (If you allow collecting), the ground (moving), or an enemy (Attack). Now, you have the auto walk. This can be done by just using a rotate to, and move over time, or you can easily make it so the user controlls the player, and you attack on your own, in which, you can have something like, if the user is __ away, and does _ attack, then apply ___ damage...
So, if we break this down further. What you need to know about Javascript is, you have variables, that can be changed. You have input devices (Check API). You have some ray casting, you have collisions, you have many functions for different things.
So, go through the API, and you can easily find stuff for each of these things...
Another way I suggest doing this:
http://www.google.com/cse/m?cx=002470491425767499270:iugs1ezlsfq&cref=&theme=DEFAULT (Search something before disregarding it -.-).
http://www.unifycommunity.com/
And www.google.com with the keyword Unity3d at the end of anything...
Now, I am NOT saying to just go online, look up exactly what you want and use premade code. What I am saying is go online, see HOW they did it, check the functions/keywords they used, and see how it works...
What this means, go in Unity, make a test scene. Now, add in scripts, change things, debug the scripts, learn what things actually do, not just, Hmmm, I found this script:
var target : Transform;
var distance : float = 3.0;
var height : float = 1.0;
var damping : float = 5.0;
var smoothRotation : boolean = true;
var rotationDamping : float = 10.0;
var targetLookAtOffset : Vector3; // allows offsetting of camera lookAt, very useful for low bumper heights
var bumperDistanceCheck : float = 2.5; // length of bumper ray
var bumperCameraHeight : float = 1.0; // adjust camera height while bumping
var bumperRayOffset : Vector3; // allows offset of the bumper ray from target origin
// If the target moves, the camera should child the target to allow for smoother movement. DR
function Awake()
{
camera.transform.parent = target;
}
function FixedUpdate() {
var wantedPosition = target.TransformPoint(0, height, -distance);
// check to see if there is anything behind the target
var hit : RaycastHit;
var back = target.transform.TransformDirection(-1 * Vector3.forward);
// cast the bumper ray out from rear and check to see if there is anything behind
if (Physics.Raycast(target.TransformPoint(bumperRayOffset), back, hit, bumperDistanceCheck)
&& hit.transform != target) { // ignore ray-casts that hit the user. DR
// clamp wanted position to hit position
wantedPosition.x = hit.point.x;
wantedPosition.z = hit.point.z;
wantedPosition.y = Mathf.Lerp(hit.point.y + bumperCameraHeight, wantedPosition.y, Time.deltaTime * damping);
}
Do NOT just come on here, post this script, and be like, hey, what's the problem with this... Edit it, add in some print("HEY"); statements, and see when what is called... By the way this is part of a smooth camera script. Don't know if it works or not...
But I hope this makes sense... Because if you try to help yourself, people here will try to help you =).
Good luck!