The Daily Click ::. Forums ::. Klik Coding Help ::. Event doesn't start when Active is moving
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
8th April, 2013 at 08/04/2013 10:49:57 -

I've never really done a big project in mmf before, and I've encountered a lot of strange bugs. The most recent one goes something like this:

"Player" collides with "Health"
+"Health" Animation stopped is playing

Then: Change "Health" animation to "Collected"
Change "Health" movement to "Movement 2"

That works fine. But if I change the Health active's first movement from Static to Path, then the above event is no longer recognised. The player can just pass through the Health without it being collected. Any ideas why this happens?


Edit: Another unrelated problem I'm having: When the player is overlapping a water tile, I create a bubble at the player's position every 2 seconds. When the bubble is not overlapping a water tile, it is destroyed. This works perfectly. However, if I try and change the time to anything below 2 seconds, the bubbles will not destroy when they're no longer overlapping the water.

I can increase the number of seconds and it works, just anything below 2 seconds seems to mess the bubbles destroying up for some reason, even though that's taken care of in a separate event. Why should increasing the rate at which the bubbles appear prevent them from being destroyed? Sorry for all the questions.

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

nim



Registered
  17/05/2002
Points
  7234
8th April, 2013 at 08/04/2013 12:19:09 -

I can't test this now but I'm pretty sure that an object moving on a path will automatically play the Walking animaton. That could be the reaon for your first problem. Try "User collides with heart and (Negate) animation Collected is playing" instead.

The bubbles problem could be happening because it's creating more than one on screen at the same time and MMF is getting confused.

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
8th April, 2013 at 08/04/2013 13:34:49 -

Ah that did it, thanks for the help nim.

As for the bubbles, I'm sure I can figure out a work around without much of a problem. I was guessing MMF would be getting confused due to things happening too fast.

Thanks!

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
8th April, 2013 at 08/04/2013 18:59:51 -

Mind posting screenshots of the bubbles and tiles and the events? Unless you've found a solution already, of course.

 

  		
  		

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
8th April, 2013 at 08/04/2013 23:35:56 -

Liam, try this for the bubbles:


IF [NEGATED] Bubble is overlapping Water Tile
THEN Destroy Bubble



Again, I'm just taking a best guess here and posting suggestions without testing.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
13th April, 2013 at 13/04/2013 22:41:15 -

I've just figured out why the bubbles are not being destroyed. (I think...)

I have the event and action set up as you describe, smr. It destroys bubble when it's not overlapping a water tile. The problem is that when MMF is creating a bubble every 1 second, there is another instance of that bubble being created which IS overlapping the water tile, so the other bubble just floats up into the air.

That's the only explanation I can come up with, anyway. It does seem strange though. Does this seem like it could be the problem?

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
13th April, 2013 at 13/04/2013 23:28:49 -

Then try adding a Flag to the event. Something like this may work:



IF Flag 0 of Bubble is Off
THEN Set Flag 0 of Bubble to On

IF Flag 0 of Bubble is On
AND IF [NEGATED] Bubble is overlapping Water Tile
THEN Destroy Bubble



If things don't seem to work, then maybe switch the qualifiers for the second event (put the Overlapping condition before the Flag 0 condition).

EDIT:
My next course of action would be to modify the first event I listed above like this:



IF Flag 0 of Bubble is Off
AND IF [NEGATED] Bubble is overlapping Water Tile
THEN Set Flag 0 of Bubble to On

IF Flag 0 of Bubble is On
THEN Destroy Bubble



Edited by s-m-r

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
14th April, 2013 at 14/04/2013 12:00:15 -

Thanks smr, but both of these have failed to work.

I've uploaded a video so you can see what's happening: http://www.youtube.com/watch?v=PSp7ff13Ci8&feature=youtu.be

Also here are the events: http://i298.photobucket.com/albums/mm280/whatpixelyouon/Capture-1_zps35c350d9.png

I could just add an active object above the water that destroys the bubbles, but I feel like that's not the most efficient way to do it...

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

nim



Registered
  17/05/2002
Points
  7234
14th April, 2013 at 14/04/2013 16:04:45 -

A quick & easy fix would be to use "Pick one at random".

Image

Nice and simple, but the drawback is that it isn't 100% perfect if many bubbles are on the screen, but it should be OK for what I see in the video.

Putting an invisible active above the water isn't a bad solution actually. It shouldn't be a big problem unless you have a lot of water sections.

There might be a better solution from someone who knows about object scope. Usually I just spread value and fastloop but that's not a great solution if you're going to be using the exporters.

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
14th April, 2013 at 14/04/2013 16:43:13 -

Thank nim! I've never used that "pick one of" event before. I will have very deep sections of water at some points, but if I have the bubbles destroyed as soon as they leave the upper screen it should help reduce the number of them on screen at any one time. I'll see how this works.

 
Image

Tell 'em Babs is 'ere...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
15th April, 2013 at 15/04/2013 03:29:16 -

Nim, that mostly solved a problem that just cropped up for me too, so thanks!

EDIT: Never mind.

EDIT EDIT: Never mind never mind.

Edited by OMC

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click