The Daily Click ::. Forums ::. Klik Coding Help ::. Floating Sprites stuck on screen
 

Post Reply  Post Oekaki 
 

Posted By Message

Rod F: The Engineer



Registered
  01/03/2005
Points
  249
16th February, 2006 at 01:56:21 -

Hello there, you probably dont know me but im working on Skating of DOOM! .. a game that has a beta available in the download section. I've been adding some new stuff and i've stumbled upon a nasty little bug using Multimedia Fusion. What happens is... let's say... when a players hits an enemy an Active Object is created and immediatly Destroyed (a little 'explosion' collision visual effect), so the only animation that it displays is the 'Dissapearing' animation... it happens some times that this 'explosion' gets PASTED ON THE BACKGROUND as if i gave it the order to do so.. but its not quite stuck.. it follows me through the playing screen frozen on a single frame as if it were part of the HUD. It sometimes happens with other Active Objects too but very rarely. I was wondering how to correct this. Nowhere in the code I accidently placed a 'Paste In Background' command... there are only 'detroy' ones.

Any help?

 
BLEH!

Mr. Esch

Stone Goose

Registered
  30/05/2003
Points
  0
19th February, 2006 at 02:37:55 -

I don't know about MMF because I hate its layout, but have you deselected the "follow the playfield" option in the object properties (which will cause it to stay in the same position on the window)? And when you destroy the object, when does the destroy event happen? You may have the object looping to the final frame or something similar. Maybe the event to destroy it isn't actually happening. Try ...

Always: add 1 to value a of object

if value a of object => 20: destroy object

--> of course, editing the value will change how long the object stays on the screen.

 
Do you feel you are being... watched?

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
19th February, 2006 at 11:50:48 -

Its some kind of bug. I got it when messing around with lots of particles.

 
n/a

Rod F: The Engineer



Registered
  01/03/2005
Points
  249
19th February, 2006 at 16:34:56 -

wish it were more like PixElf says, but sadly it aint. It does not always happen and it sure seems to me that its some bug from MMF's engine. Killmaster is closer to my point.. i wasn't working with particles and it can appear from the first time characters collide during gameplay to not appearing at all. Anybody knows if it really is a bug on MMF coding? or other suggestions?

 
BLEH!

Leighton Williams



Registered
  24/04/2005
Points
  173
19th February, 2006 at 20:01:29 -

When the animation on the explosion ends, have you set it to destroy the active object?

 
If you fail, try try again... You'll get it in the end

Mr. Esch

Stone Goose

Registered
  30/05/2003
Points
  0
19th February, 2006 at 20:34:14 -

maybe you could use the fast loop to refresh the screen

 
Do you feel you are being... watched?

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
19th February, 2006 at 20:45:00 -

I haven't had this problem, but I'm using TGF. Ask anyone who's played The Core, I'm using a LOT of particles.

My Method is quite simple for destroying particles.

Number of Group.Particles > 0 - Add 1 to value A of group.Particles
Group.Particles.Values A >= (Greater of equal) 15 - Destroy Particle.

That method has always worked for me.

-------
Rod - is it possible you're hitting your object limit without realizing it. I mean it may look like it's only making 1 particle, are you sure it's not making like 50 of them that you can't see?

 
Craps, I'm an old man!

Rod F: The Engineer



Registered
  01/03/2005
Points
  249
19th February, 2006 at 22:45:46 -

Knudde, that idea sounds quite useful.

The coding i use when, lets say two object collide between each other, is:

Object 1 collides with Object 2:
Create Active Object "Effect" @ 0,0 from Object 2

Then I have a few lines lower:
Animation 'Stopped' of "Effect" has finished
Then Destroy "Effect"

I even tried directly detroying the Active Object the minute its created... projecting only the "dissapearing" animation.

It's quite amateur coding, i know... I was wondering how to employ the 'fast loop' to refresh the screen as PixElf suggested... ill go try it now.

 
BLEH!

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
20th February, 2006 at 20:36:33 -

Yeah, NEVER trust the animation is finished - Destroy thing

It just doesn't work. My method works everytime.

 
Craps, I'm an old man!

TPK



Registered
  22/11/2005
Points
  880

I am an April FoolVIP Member
3rd March, 2006 at 04:40:08 -

Or you could just make the object invisible before you destroy it. That's what I did when I ran into that problem.

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
3rd March, 2006 at 12:32:25 -

I noticed this problem in ArcaneTale, especially with the water; it’s most common for me when I have particles that have fades in & out. I fix most of them by just having the alterable value to be 0-128, and set the invisibility to the value of the alterable value. The object has to have semi-transparent selected before it will work in run-time though. Otherwise the visibility will change, but you won’t see any visual change. This is really useful because it allows you to have more flexible fades like pulsing fades and such, so not only is it a solution, but its an improvement.

Btw: As far as what you said Shab, I use the animation finished destroy a lot, maybe that’s the source of my problem. I’ll try your idea out, thanks.

 
http://www.facebook.com/truediamondgame

Zapper



Registered
  05/02/2003
Points
  435
3rd March, 2006 at 19:59:13 -

I think I had a problem like this a long time ago, and I just stopped having a disappearing animation, I think thats the source of the problems.

My advice would be try moving your disappearing animation into your stopped animation, then empty your disappearing animation and then make your object become destroyed by Shab's method, it might help.

I think theres a few bugs with the animations, theres the one where if you keep telling the game to load an animation, "Punch" for example, whilst "Punch" is already playing, it can sometimes get stuck at the end of the animation, until you change the direction of the active object.

Image Edited by the Author.

 
n/a

Destroyer (CrobaSoft)



Registered
  10/10/2004
Points
  1106
3rd March, 2006 at 20:10:02 -

You can fix that bug, simply unticking 'inactivate object if too far from window'

 
Visit www.crobasoft.com or you're a Noob.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
3rd March, 2006 at 20:24:15 -

i had this problem in a tgf game i was making. i had a fastloop particle effect for blood and sometimes a couple peices of blood would just stick and follow me around. and its not pasted into the background because its above everything. oh and i didnt have a dissapearing animation so i dont think that was the problem.

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
3rd March, 2006 at 20:49:12 -

@Destroyer: That really works? I never tried that, I'll have to check that out sometimes. Thanks.

 
http://www.facebook.com/truediamondgame
   

Post Reply



 



Advertisement

Worth A Click