The Daily Click ::. Forums ::. Klik Coding Help ::. Reincarnating enemy?!
 

Post Reply  Post Oekaki 
 

Posted By Message

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 19:51:07 -

Hi there! I'm having a problem with an enemy reincarnating directly after dying.
As it is now, the event goes as follows

Hitpoints = 0:
change animation to "Disappearing"
Animation disappearing has finished = destroy

It goes through the animation but seems to freeze up at the last one, then it disappears for a second and then returns. It is not being "created" by any event. I'm not sure what is causing this,any ideas?

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 19:55:31 -

Hitpoints = 0

Destroy

The disappearing animation automatically plays when you destroy an object.

You'll probably want to make it Hitpoints <= 0 so that if the enemy hp goes into the negatives it will still die.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:07:55 -

I've tried that too, I even did a "if hitpoints <0 set hitpoints = 0" but it didnt work out. If I remove the "disappearing" animation alltogether it destroys fine, but I'd really like to keep it in.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:11:44 -

also worthy of note: when I make an event to destroy the enemy when I press for instance "J", it is destroyed but reincarnated, and the command doesnt work a second time.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 20:14:01 -

Don't change the animation manually. Remove the part that says "change animation to disappearing"


Edited by GamesterXIII

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:25:37 -

It didnt do any difference, I've tried setting it manually and destroying it at once.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
18th November, 2010 at 20:28:05 -

Does your destroying animation loop?

 

  		
  		

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:29:44 -

No, it's a 14 frame-single run at speed 20.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 20:41:31 -


Originally Posted by Benny Lindberg
It didnt do any difference, I've tried setting it manually and destroying it at once.



You're not being clear in what you are saying at all.

Post a mfa.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:47:06 -

What I mean is, I've tried having the animation set to Disappearing at 0 hitpoints, but i've also tried destroying it at 0 hitpoints. Neither has worked.

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
18th November, 2010 at 20:53:01 -

Just use destroy, it starts dissapear animation automaticly

 
Code me a sausage!

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
18th November, 2010 at 20:53:14 -

Try moving the animation you want in disappearing into another animation type and then retry it.
So for example it should be:

Hit-Points of ("Enemy") = <=0
Change Animation of ("Enemy") to Shooting
Animation shooting has finished = Destroy ("Enemy").

Maybe that might fix it? I'm not quite sure to be honest, MMF2/TGF2 has odd ways of giving you bizar bugs with these things. I tried making a monitor once and I had kinda the same problem when trying to show a disappearing animation when the monitor/box was hit.


 
-----------------------------------------------

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 20:56:34 -

Worked like a charm Blazefire, thanks a bunch! Such a weird bug.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 21:02:40 -


Originally Posted by xXBlazefirelpXx
Try moving the animation you want in disappearing into another animation type and then retry it.
So for example it should be:

Hit-Points of ("Enemy") = <=0
Change Animation of ("Enemy") to Shooting
Animation shooting has finished = Destroy ("Enemy").

Maybe that might fix it? I'm not quite sure to be honest, MMF2/TGF2 has odd ways of giving you bizar bugs with these things. I tried making a monitor once and I had kinda the same problem when trying to show a disappearing animation when the monitor/box was hit.



He could have just fixed it the way I originally told him. Don told him the same exact thing and for some reason he didn't listen ?_?

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
18th November, 2010 at 21:03:14 -

It's not a bug actually, when you destroy an object, it auto starts the dissapear animation, on animation finished if you destroy the object you will force dissapear animation again.


 
Code me a sausage!

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 21:08:33 -

I know thats what I was trying to tell him.

Adding the line to change the animation is redundant

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 21:38:56 -

Gamester, he told me to set "destroy" in the event, not to switch the slot of the disappearing animation. Only using destroy in the event didn't help,
changing the animation-slot did. I don't want you to think I listen to advice, I really appreciate that you tried to help me!

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th November, 2010 at 21:49:10 -

I didn't really take offense, I'm just trying to say that switching the animation slot is un-necessary.

Whenever you destroy an object the disappearing animation plays automatically so you don't have to code it in. Your problem stemmed from this.

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 21:51:08 -

I'm not so sure, I still got the problem even when i had no event starting the disappearing animation, only the destroy event.

 
n/a

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
18th November, 2010 at 21:54:36 -

Mind posting the mfa so I can take a look what it?

 
-----------------------------------------------

Benny Lindberg



Registered
  08/11/2010
Points
  54
18th November, 2010 at 21:57:31 -

It's alright, i got it working when i changed the animation slot as you said. Thanks again!

 
n/a

xXBlazefirelpXx



Registered
  14/06/2010
Points
  45
18th November, 2010 at 22:06:02 -

You're very welcome benny.

 
-----------------------------------------------
   

Post Reply



 



Advertisement

Worth A Click