Computer Science Canada Help needed with multiple sprites! |
Author: | Emmie [ Wed Jun 06, 2007 10:28 am ] | ||
Post subject: | Help needed with multiple sprites! | ||
I have one sprite which the user controls and a monster sprite which is supposed to move on its own. They are completely different sprites but when the user moves their sprite, the monster sprite keeps thinking that it's being freed. The same basic code is being used for both of them so I'm not sure why the monster won't work. I think that the monster thinks the Sprite.Free is meant for it when it is meant for the user controlled sprite? Here is some of my code:
Thanks guys! |
Author: | Mazer [ Wed Jun 06, 2007 12:39 pm ] |
Post subject: | RE:Help needed with multiple sprites! |
I'm having difficult trying to figure out just what the hell you're trying to do without causing myself pain. Some advice: 1) Use code tags (and make sure your code is indented). This makes people more willing to read your code. 2) Never create sprites in a loop like that. Create it ONCE at the beginning and use the same one inside the loop. 3) It's considered bad to use processes. I get the impression that you don't give a crap about programming "properly" so I'm not going to waste time talking about why; just know that most people who would help you will likely suggest that you not use them. |
Author: | Emmie [ Thu Jun 07, 2007 8:18 am ] |
Post subject: | Re: Help needed with multiple sprites! |
Thanks for number two. I didn't realize I had created my sprite inside the loop. ![]() |