Computer Science Canada Sprite movement help |
Author: | Wasabicheese [ Wed Apr 29, 2009 12:11 pm ] | ||||
Post subject: | Sprite movement help | ||||
Im making a zelda game. How do you make it so that link loses health if hes hit by an arrow? The XXXXX part shows where i need help.
Mod Edit: Remember to use syntax tags! Thanks ![]()
|
Author: | Tony [ Wed Apr 29, 2009 12:50 pm ] | ||
Post subject: | RE:Sprite movement help | ||
first -- you shouldn't be loading and reloading the same picture inside the loop. second -- you already know that Link is facing left, whenever he moves to the left
but you are not currently making use of that information. |
Author: | tjmoore1993 [ Wed Apr 29, 2009 4:59 pm ] |
Post subject: | RE:Sprite movement help |
I will help you out a bit, I will contact you in a bit with a copy of the code finalized. It should have what you want and it will be setup to be efficient. |
Author: | Tony [ Wed Apr 29, 2009 5:00 pm ] |
Post subject: | RE:Sprite movement help |
@tjmoore1993 -- don't do that. |
Author: | tjmoore1993 [ Wed Apr 29, 2009 5:34 pm ] |
Post subject: | Re: RE:Sprite movement help |
Tony @ Wed Apr 29, 2009 5:00 pm wrote: @tjmoore1993 -- don't do that.
Why not? |
Author: | Tony [ Wed Apr 29, 2009 5:44 pm ] |
Post subject: | RE:Sprite movement help |
The idea is to help students understand the concepts and gain skills necessary to complete the assignments on their own, not just do it for them. If they'll simply take your solution now, they'll have even more difficulty catching up for the next assignment or project. |
Author: | tjmoore1993 [ Wed Apr 29, 2009 5:56 pm ] | ||
Post subject: | RE:Sprite movement help | ||
Tony is right. However I have made a base to work from. Everything is almost included but the problem is you need to figure out collision on your own.
63 line(s) of code This demonstrates a procedure structure that should be used. I will give you a link to a guide that has helped me with collision and it should help you. http://compsci.ca/v3/viewtopic.php?t=13661 Good luck. |
Author: | tjmoore1993 [ Wed Apr 29, 2009 6:11 pm ] |
Post subject: | RE:Sprite movement help |
@ Wasabicheese If you are having problems with Collision then post another topic. Make sure when posting a topic you atleast show members that you tried to solve your problem. Also inform us on what techniques you have tried. When you are finish the game don't forget to submit it and let us users check it out. ![]() |
Author: | Wasabicheese [ Wed Apr 29, 2009 10:40 pm ] |
Post subject: | Re: Sprite movement help |
thanks a lot for your help! I'll be sure to post this in submissions when im finished! |
Author: | Wasabicheese [ Fri May 01, 2009 12:05 pm ] | ||
Post subject: | Re: Sprite movement help | ||
I've been having another problem. on the "pic.draw" lines near the bottom, i receive the error message "Illegal Picture ID number '0'" does anyone know how to fix this?
|
Author: | BigBear [ Fri May 01, 2009 4:14 pm ] |
Post subject: | RE:Sprite movement help |
The Picture isn't being create make sure the picture file and this source file are in the same folder |
Author: | tjmoore1993 [ Fri May 01, 2009 4:30 pm ] |
Post subject: | RE:Sprite movement help |
Try looking over this guide http://compsci.ca/v3/viewtopic.php?t=191 The guide is kind of crusty, but it should help though. Any questions feel free to "pm" me or simply post in this topic. |