Fire Dragon Posted February 5, 2006 Share Posted February 5, 2006 Can I like create object when program is running?And then,when something happens,destroy it?Like this way.Example in game there is wizard what creates fire ball object,what then flyes towards to your character.If your character collides to it,you lose HP.So how I can make it so wizard like creates that fire ball object?I just learned OOP's basics,but I don't know how call them That was easiest thing,I think.Next is little harder.How set it so that fire ball disappearafter some seconds or when it hits player?I know collinsion code,but how I can destroy object?And one more thing,how I can create that same object again,because I want that wizard shoots more than one fire ball?So like how turn object "on" and "off"?Thanks for help. Link to comment Share on other sites More sharing options...
aspnetguy Posted February 6, 2006 Share Posted February 6, 2006 I think it is great that you want to tackle such a large project but from what I have seen of your code and what you have told me I really think you should do some simpler projects so you can get a better understanding of what javascript can do. Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 6, 2006 Author Share Posted February 6, 2006 Okay then.Actually that wizard thing was only example,but I understand what you mean Link to comment Share on other sites More sharing options...
aspnetguy Posted February 6, 2006 Share Posted February 6, 2006 have you gone through all the JS tutorials on www.w3schools.com???? Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 6, 2006 Author Share Posted February 6, 2006 I'm now in advanced section.However,in object section was some things like Boolean (what ever it is?)what I didn't understand,but what I learned with my JS book. Maybe I must give up,if I'm so bad coder,or hide somewhere to learn JS... Link to comment Share on other sites More sharing options...
aspnetguy Posted February 6, 2006 Share Posted February 6, 2006 I'm now in advanced section.However,in object section was some things like Boolean (what ever it is?)what I didn't understand,but what I learned with my JS book. Maybe I must give up,if I'm so bad coder,or hide somewhere to learn JS... <{POST_SNAPBACK}> I didn;t say you were a bad coder...you just need to get some more practice before tackling game design...game design needs a very firm understanding of objects and how they work...I would focus on that. Link to comment Share on other sites More sharing options...
scott100 Posted February 6, 2006 Share Posted February 6, 2006 Maybe I must give up,if I'm so bad coder,or hide somewhere to learn JS... <{POST_SNAPBACK}> Just give it time, none of us learned javascript etc overnight and i for one still have alot to learn.As aspnetguy said it's great that you have such ambition but you have to learn to crawl before you can walk.Start of with some simple projects to help you understand what the code can do for you then gradually increase the difficulty. Link to comment Share on other sites More sharing options...
Fire Dragon Posted February 6, 2006 Author Share Posted February 6, 2006 Thanks guys,snif. :)By the way,is it "null" what destroys objects all values? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now