I have an If statment in a on(EnterFrame) in side the actions of a movie clip. For some reason it does not work. I have other if statments in on enter frames and they all work but this one jsut doesn’t.
I was told that a on(enterframe) continues to repeat the code while the frame head is over it so it should alwasy check the if statment until the conidtion comes true and moves the frame head. Is my logic not correct?
It is for a shooting game. “life” starts at “100” and “dead” is “0”. When my “life” drops to “0” it will be less then or equal to “dead”. It should goto the fram label “gameover” which has a stop action and display some game stats. Any ideas
Does it trace anything? If it does, it’s probable that it’s not working because you’re gotoAndPlaying to a scene name. Try to use frame labels instead.
its a common problem with using scenes in movieclips. In short, you cant use scenes in movieclips, only from the main timeline. Though you may have written that code from the maintimeline, its still being played in the scope of that movieclip, at which case the movieclip is trying to go to the label “main”
if you want to go to a frame in the main timeling from there, you should use a frame label and say
Ya it hit zero and it started to trace yets it still wouldn’t play the goto. I changed the goto to jsut a frame numbe and now it works. but i’m having some score issues. Here is a link for the game so far. No preloaders yet and it is 58k so it might taek a bit.
*edit ya sen i was trying to use scenes fir the first part and that was porbably the biggest probelm. now that i’m not it works fine.