The Daily Click ::. Forums ::. Klik Coding Help ::. MMF2 position testing error (my god i started with KNP 6-7 years ago and i'm stuck)
 

Post Reply  Post Oekaki 
 

Posted By Message

dndfreak



Registered
  11/01/2009
Points
  650
12th January, 2009 at 20:26:54 -

I posted this on my project (Brawlfest) but figured that Id get better results here. Note that Bwawlfest is a top-down fighting game done SSB style:

So I started throwing in some pregen graphics to test the thing when I ran into my first snag- Before I even programmed any collisions! I'm using two characters, the TD Knight and Demon from the ClickTeam library. When the Knight is out of play, he loses a life and the demon gains a point. HOWEVER, when I use the exact same code for the Demon, he respawns 5-6 times even though the Knight does it perfectly. Can anyone help me? Thanks in advance. If you want the file, I'll try to put a link up. However, I use simple code. These are the only two events I have:

Knight is out of play area: Destroy Knight, Create Knight(center screen), Player 1 lives - 1, Player 2 score + 1

Demon is out of play area: Destroy Demon, Create Demon(center screen), Player 2 lives - 1, player 1 score + 1

I have no idea as to why it's doing this. Help would be greatly appreciated.



Edited by dndfreak

 
Vegeta? What does your mother say about my power level?

ITS OVER 9000!!!

-J-



Registered
  05/10/2008
Points
  228

VIP MemberThe Cake is a Lie
12th January, 2009 at 22:00:16 -

You should open up the Event List Editor and make sure that those events are in the EXACT order you mentioned above. If you're creating the demon and THEN destroying it, even in the same event, you might run into some glitches.

Other than that I have no idea

Or you could change your code to say, instead of creating a new object when it goes out of the screen, just reposition the original one. Of course, then you wouldn't need the "destroy" event either.

Edited by -J-

 
n/a ...

dndfreak



Registered
  11/01/2009
Points
  650
13th January, 2009 at 01:06:22 -

I already thought of the order bug and that was fine. If I did a reposition then any anims/acceleration would be still in effect, meaning that if he was thrown off the screen then he would be put back just to be thrown again. My main concern is the difference between the Knight and Demon.

 
Vegeta? What does your mother say about my power level?

ITS OVER 9000!!!

dndfreak



Registered
  11/01/2009
Points
  650
13th January, 2009 at 01:11:11 -

Actually, I realized something. The two objects have destroy animations. The Knight falls spread eagle, so he jumps back into the frame. The Demon falls forward, so the event occurs until the death animation is over, thus creating multiple respawns. If I delete the death images, it should work fine. I'd take this off, but If multiple people have this question (its kinda tricky)...

 
Vegeta? What does your mother say about my power level?

ITS OVER 9000!!!
   

Post Reply



 



Advertisement

Worth A Click