The Daily Click ::. Forums ::. Klik Coding Help ::. Multiple Instances problem
 

Post Reply  Post Oekaki 
 

Posted By Message

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 October, 2004 at 13:06:50 -

I have a problem with the baddies in my game, They are coded with a custom movement, and I have events saying things like if there is a backdrop on the right side of the object and it is facing right, go left.

The problem is, that it works, but when I copy the object so there are 2 of them, only the most recent one detects the collisions and when it does it turns all the other enemies too.

Does someone know what the problem is and what to do to correct it?

 
n/a

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  50116

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
19th October, 2004 at 15:22:49 -

Can't you use active objects instead of the backdrop as detectors?

Also, can you type down exactly what your events are?

 
n/a

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
19th October, 2004 at 22:06:35 -

You probably have to the Spread a Value method on both the enemies and the detectors. I think what is happening is that the latest enemy created has focus, and when something general happens to it (that doesn't use alterable values or flags), that event will happen for all the other enemy objects (so when the latest enemy collides with the background, all of the other enemies will turn around with that other enemy).

 
http://www.klik-me.com

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
20th October, 2004 at 14:58:36 -

Don't worry guys, I solved my own problem It turns out, never use collision masks I just changed the code a bit and now it works, thanks anyway guy

 
n/a
   

Post Reply



 



Advertisement

Worth A Click