I would like to know the scripting roles in unity3d . like what can it make and what its powers . i already know that it makes player move ,attack, jump , play the animation on time etc … so other than these roles i heared that we can create animation directly by scripting instead of make it by visually . like if someone is not good at animation but good at programming so he can make animation by just writing scripts … like these i want to know all its features so can someone tell me or give me a link where i can find all its feature? . i also want to know everything … so if iam good at programming can i make realistic envoirment or something awsome?
With experience, skill, and attention to detail, you can make Unity do almost anything with scripting. Yes, that includes animation, realistic environments, and much more. Here is a link where you can find all the features (and here is a more specific one that focuses on programming in particular).
Wow thats amazing !! scripting is just writing but it has so much power . then iam going to spend most of time learning scripting than doing others. its also not expensive like if i need good animation i need to spend money on modelling software like maya 3dsmax etc but scripting free. and thank you so much for help . by following your guide i learned lots of new things in unity3d… (:
Well depending on what you’re animating, replacing your animations with scripts isn’t a great idea. Simple “moving things around the screen” sort of animations are easily done with code (lookup “tween”) but skeletal animation of characters is really really painful to write in code, basically to the point of impossible.
cool and i need help that when my enemy health comes to 0 he plays dead animation but after that he dissapered but i want him to lie dead on floor instead of vanishing . here are the scripts
#pragma strict
var Health = 100;
var animationDie : AnimationClip; // Drag your animation from the project view in here (to inspector)
function ApplyDammage (TheDammage : int)
{
Health -= TheDammage;
if(Health <= 0)
{
Dead();
}
}
function Dead()
{
GetComponent.<Animation>().Play(animationDie.name);
Destroy(this.gameObject, animationDie.length);
}
and its gives error on console if i remove “Destroy” from script
If you want him to keep lying on the ground, then just don’t Destroy() him?
thank you for reply . its sloved
and also i removed destroy from script now its working but now he is idle so no problem in future when i make him move and attack will that affect ? like even he does not stop moving after dead