The Daily Click ::. Forums ::. Klik Coding Help ::. Destroying objects wrong
 

Post Reply  Post Oekaki 
 

Posted By Message

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 12:31:57 -

Does anyone ever get a problem that when they destroy an object, they get stuck "on" the screen, but physically arn't there, you just get the image of the last frame they were on before they were destroyed stuck on the screen? The image which gets stuck scrolls around with the frame.

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th June, 2006 at 12:37:23 -

Yes, this happens to me a lot.

What I do is make the last frame of the disappearing animation a blank picture.
It hasn't happened to me since.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 13:39:52 -

Ah yes, it always happens when i destroy the object at the end of an animation, i didn't think of fixing it like that, thanks!

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th June, 2006 at 17:23:05 -

That usually happens if you do a "Animation is over - Destroy" event. If you use hard values, it doesn't happen (to me at least)

 
Craps, I'm an old man!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
4th June, 2006 at 17:46:08 -

Yeah, I do destroy when animation ends a lot. That explains that!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
4th June, 2006 at 18:14:52 -

Never happened to me. I never use disappearing animations anyway. They can fuck up some things sometimes.

Is this in TGF or MMF? I want to know if I'm supposed to say "OMFG GET MMF, N00BZ!!!1" or not.

 
n/a

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 18:23:09 -

I use MMF, and ill just put the last frame as transparant.

It only happens on one object... it's a sparkle that sort of fizzles out and then is destroyed kinda thing.

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th June, 2006 at 19:04:22 -

Here's the right way to do it (It amazes me that ppl don't know this)

Number of (Effect) > 0 - Add 1 ValueA.(Effect)
Valuea.(Effect) >= 15 - Destroy

Obviously, it doesn't have to be 15, but I find that 15 is a good number for small effects (Like flame spit out of a gun barrel)

Oh and make ABSOLUTELY SURE that you have it as >= (greater than or equal to) not just = (equal to) because as much as CT likes to deny it, sometimes click products miss events in loops. (In this case the destroy event, I've had it skip on right by that part when I was using =15, and that leads to stray effects.)

Image Edited by the Author.

 
Craps, I'm an old man!

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 19:09:17 -

Actually, that wouldnt work

It would have to be:

-Set value to 'frame' of animation

-When value = whatever the last frame of the animation is, destroy.

Otherwise the object will destroy too early or too late, or youd have to spend ages finding the right value for it.

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th June, 2006 at 19:19:18 -

Didn't we just have a discussion on why that DOESN'T work right? Plus the fact that the "Frame of animation" thing is buggy and doesn't fire all the time, and when it doesn't, the object is left on the field as the "= frame of animation" only fires once in a non looping animation (because there's no >= for animation frames). Just cause it looks like it should work right doesn't mean anything in CT products sometimes; you've got to cover your own ass. Trust me, this is the best (most bug free) way to do it.

You don't need to spend ages, here's a handle little chart.

1 sec of gametime = 47~49 loops (Rounding to 50 works)

So when value a = 100 - two seconds have passed.

It's actually really easy to figure out when to destroy them.

 
Craps, I'm an old man!

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 19:25:30 -

Yah i know all that (although i didn't realise the frame of animation thing was THAT buggy), ill just stick with leaving the last frame blank its the easiest/fastest way. But one thing i don't understand is how to understand the animation speed values in the animation editor, what would 0 mean and what would 100 mean?

Also, why is there minimum and maximum values? There is no option to choose between these in the event editor? I always just use "change animation speed" and set it to an alterable value.

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th June, 2006 at 19:45:13 -

errr...change animation speed doesn't typically work in any CT product. It's a common bug. But if it works for you, all the more power to you.

As for why there's a threshold between 0-100 in custom animations is this. When using the normal CT movement (with the Speed command) click products like to be "smart" and synch up the speed of the animation with the speed of the object. The Maximum and Minimum values are the the base "slowest" and "fastest" the given animation can run at, and TGF/MMF factors this into determining how fast to display your animation at any given object speed.

As for what it ACTUALLY runs at (FPS-wise); I don't know. I would assume it's something like this:

25 - Minimum Animation Speed
75 - Maximum Animation Speed

75-25 = 50

100 (Maximum object speed) / 50 (Animation speed threshold) = 2

So about 1 "tick" of animation speed for every 2 object speed.

 
Craps, I'm an old man!

-Nick-

Possibly Insane

Registered
  24/11/2002
Points
  2468

VIP Member
4th June, 2006 at 19:51:43 -

Ah ok, with the set animation speed thing, i just assumed I'd used it before and assumed it worked, so it might not work at all. And thanks for explaining the max and min speeds, I've always been a bit confused by them (havn't used built in movements for years). Thanks!

 
Project: Roller Coaster is on it's way!
http://www.projectrollercoaster.co.uk/
http://www.craftsncreatures.com

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
4th June, 2006 at 19:54:52 -

No problem

 
Craps, I'm an old man!
   

Post Reply



 



Advertisement

Worth A Click