The Daily Click ::. Forums ::. Klik Coding Help ::. Cannot test for Collisions for a created object
 

Post Reply  Post Oekaki 
 

Posted By Message

Dragicorn



Registered
  18/01/2011
Points
  30
20th January, 2011 at 17:26:03 -

when I have an object created, all of it's regular functions cease to work. Collisions and values and such don't activate. I've checked the whole coding, even just used a create coding and collision coding, they still don't activate the collision, such as:

At 1:00 seconds --> Create Shield and Set Shield's Alterable Value A = 0

Every 2:00 --> Set Shield's Alterable Value A to 1

Every 3:00 --> Set Shield's Alterable Value A to 0

When Shield's Alterable Value A = 1 --> Reappear Shield

When Shield's Alterable Value A = 0 --> Make Shield Invisible

When "laser" collides with "shield" and Is Shield Visible? --> Destroy laser


In this case, shield fails to become visible, and so, the collision fails to happen.



Taking Away the Alterable Values and Setting the shield as always visible,

At 1:00 seconds --> Create Shield

When "laser" collides with "shield" --> Destroy laser

In this case, laser fails to destroy when colliding with shields.

Tried this all by themselves with no other variables happening, even for the objects themselves (behaviors).

Is this a glitch in MMF2 Version 249 Final? Should I upgrade to 250 beta 1?

I have windows vista and XP, and the same thing happens on both computers. I use a laptop. When I tried it on a set top, It still did this.

 
Game Designer! MMF2

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
20th January, 2011 at 17:31:25 -

When the object is created try

Flash during 1 second.

The other stuff is un-necessary.


Also instead of collision, do

Object 1 is overlapping Object 2
+ Object 2 is visible

Destroy Object 1

For collide with events the object usually has to be moving. Overlapping fixes this.

Edited by GamesterXIII

 
n/a

Dragicorn



Registered
  18/01/2011
Points
  30
20th January, 2011 at 17:37:10 -

Actually, what I want is the shield to randomly appear and dissapear, and when it appears, the collision will be tested. When I flashed it, collision didn't activate still.

 
Game Designer! MMF2

Dragicorn



Registered
  18/01/2011
Points
  30
20th January, 2011 at 17:38:40 -

so, is the launched object the problem? Cause a launched object colliding with a created object maybe the problem. I'll try the overlapping part.

Oops, forgot the edit part, and I can't seem to delete this one...

Edited by Dragicorn

 
Game Designer! MMF2

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
20th January, 2011 at 17:41:38 -

Well . . it should work with what you had

Laser collides with shield
+ shield is visible

if it doesn't the overlapping event wont hurt.

 
n/a

Dragicorn



Registered
  18/01/2011
Points
  30
20th January, 2011 at 18:15:44 -

Well, the overlapping event didn't work. Should I send my mfa file for troubleshooting?

 
Game Designer! MMF2

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
20th January, 2011 at 18:28:15 -

If you feel like it sure.

 
n/a

Pan-tosser



Registered
  24/10/2008
Points
  520

Has Donated, Thank You!
20th January, 2011 at 20:17:33 -

flash object is automatic. I'd never try and mix automatic code with custom code. It always leads to bugs. I'd try turning the visable on and off manually instead of using flash object.

 
https://www.facebook.com/nathon.brown.7

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th January, 2011 at 20:23:56 -

Object's that are launched instead of created are not treated the same.

For some reason many of the functions of that object no longer work when the object is launched.

So don't use "launch object"

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
21st January, 2011 at 08:05:45 -

YAh, sry i totally missed what you were trying to do.

Make sure they are on the same layer otherwise collision doesnt work.

Edited by Don Luciano

 
Code me a sausage!
   

Post Reply



 



Advertisement

Worth A Click