I need serious help, my problem isn’t that I don’t know how to program, Its that i find it hard to use what I know. For instance, I understand how javascript works, in and outta unity for web development, I know how to write loops how to define variables, how to use functions, but what i cant seem to grasp, is how to put it together to develop with… That is my biggest set back and its very frustrating… its like knowing how to drive a car but not actually being able to stay on the road, ok maybe that was bad example but you should understand what I mean.
Here is an example of what i mean, say i wanna create a player’s health, I know what i need to do to set it up for instance, Define Variables
and I know i need to set up some kinda loop to show the GUI, calculate damage, test if health has increased ect. what but I dont understand is how to do this. I know is has something to do with OnGUI and the other classes/functions I understand what they do but I dont kno how to put them together or even use them and thats my problem.
well you dont have the base of programming and thats hard to teach you here but i can give you some example:
var maxHealth : int = 100;
var currentHealth : int = 100;
function OnGUI()
{
GUI.Box (new Rect (0,0,50,30), currentHealth.ToString()); //new Rect (x,y,width,height), variable u want to show .ToString() to parse the type of varible you had.
}
Thats what I’m saying, Its not that I cant understand what it does or how it works, I cant understand how to use it. I wanna learn, but all everyone does is tell you what it does and stuff for instance here is a loop/if statement i wrote in php
Of course this will be echoed to the screen
I have programmed before and I have put php to use, what i cant seem to grasp javascript, I also know C# but was having the same problem, like i said its not that I dont kno how to program its that i cant seem to put it to use…
And thats what I need help with, can anybody tell me why I can’t put all the pieces together in javascript, if I have done so in previous languages. its like I have some sorta programmers block, ad this has never never happened to me… I really dont know what to do