The Daily Click ::. Forums ::. Klik Coding Help ::. Another Custom Movement Problem.
 

Post Reply  Post Oekaki 
 

Posted By Message

Greasy



Registered
  15/02/2005
Points
  322
8th July, 2006 at 16:48:13 -

Ok so I got my custom movement working right. But there is one more problem , when his foot detector overlaps a backdrop, the gravity stops fine, and he stays on top of the ground. But now When I test his foot detector on an active object, the simply floats slowly down into the object even though I put code to stop that. Here is my code:

Gravity stopping for backdrops:
(Note: the main char's gravity is used for all of the detectors, so the detectors follow the character in the same spot the whole time.)

On loop "grav" + "Foot Detector" is overlapping backdrop = Stop loop "grav" + Set Gravity to 0 (this works fine)

Gravity stopping for collision on active object:

On loop "grav" + "Foot Detector" is overlapping "Active 8" = Stop loop "grav" + Set Gravity to 0

See, its the exact same test as overlapping the backdrops , but when his foot detector overlaps the active object, he just sinks below it.


Image Edited by the Author.

 
n/a

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
8th July, 2006 at 16:51:29 -

I know it sounds stupid, but try switching it to (active object 8 is overlapping foot).

It sometimes works.

 
Craps, I'm an old man!

Greasy



Registered
  15/02/2005
Points
  322
8th July, 2006 at 16:54:02 -

Damnit, everytime I post a problem here I solve it right after. Turns out that I had

"Foot Detector" is not overlapping a backdrop + gravity < 6 = add 1 to Gravity

I forgot to add the "Foot Detector" is not overlapping "Active" In there.

EDIT : Oh well, I guess solving it is a good thing.

Image Edited by the Author.

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
9th July, 2006 at 05:24:19 -

loops and colission between actives is buggy in MMF, ha to cancel alot of coolish stuff in my movements because of this...

 
n/a

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
9th July, 2006 at 07:57:26 -

And you may want to change the name of Active 8 to something that better describes what it does. It may seem like nothing, but I find it to be important overall.

Trust me on this one, don't make the mistake of having 50 objects with names like "Active Picture 14". It'll be much easier to go through later when your code is more complex.

 
--

"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!

Greasy



Registered
  15/02/2005
Points
  322
11th July, 2006 at 16:52:54 -

Most of my stuff is names. All my detectors and objects that I use a lot of code for have names.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click