The Daily Click ::. Forums ::. Klik Coding Help ::. Qualifier Problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Dalal



Registered
  28/03/2004
Points
  307
5th April, 2006 at 02:46:41 -

I'm going to try to give you as many relevant details as possible, because this qualifier thing is getting annoying. Okay, here is a condition I created for when my character collides with an enemy:

Group.Enemies collides with Character
+ Value A(Group.Enemies)=0
+ Y("Character")>Y(Group.Enemies)+3
----> Set Value A(Group.Enemies) to 1

Value A(Group.Enemies)=1
----> Destroy Group.Enemies

So if all the conditions above the arrow are true, then alterable value A of the enemy should be set to 1. If an enemy's alterable value A is 1, then it gets destroyed. The problem that is occuring here is, when I hit certain enemies, some other enemies of the same object start to destroy. Lets say, for example, I have 3 objects that are all called Bird, and another object called Frog. Bird and Frog belong to Group.Enemies. Now, if I hit a certain Bird, the other two birds get destroyed as well, but the Frog remains where he is. If I hit some other birds, than it works fine, but its only if it is a certain bird that I hit that the rest of the bird objects get destroyed, I think the one that I create last in the frame editor. Hope that wasn't too confusing. But anyway, you get the general idea...

Can anyone offer a solution to this annoying problem?

Thanks a lot,
Dalal

 
.bin there done .dat

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
5th April, 2006 at 03:02:17 -

Hmm... qualifiers can be tricky like that...

One thing I'll say is that the Y position comparison should be relative to the qualifier, instead of the player. Y(Group.Enemies)<Y("Character")-3 instead. You might also try Group.Enemies is overlapping Character as opposed to colliding with.

 
Go Moon!

Dalal



Registered
  28/03/2004
Points
  307
5th April, 2006 at 03:15:46 -

Thanks for the reply,

I asked this question on another forum and I got the same suggestion of making it relative to the qualifier instead of the character. I tried that but it didn't fix the problem. For some reason, the alterable value A of more than one object is being set to 1, so more than just that single object is being destroyed, which I don't want. I wonder what's wrong ... as for the collision testing, I've tried that before but it didn't work. But thanks for your suggestions...

Image Edited by the Author.

 
.bin there done .dat

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
5th April, 2006 at 04:09:35 -

How odd...
The collision SHOULD be a strict limiter on what gets affected...
I can only think that some other event is changing your values, but then it wouldn't all happen at once.

How very curious.

 
Go Moon!

RedHades



Registered
  25/05/2003
Points
  108

Has Donated, Thank You!
5th April, 2006 at 05:04:31 -

Try "Overlapping" instead of "Collision" and maybe this order of conditions will work better.

Con [Character]: (Character) is overlapping (Group.Enemies)
Con [Group.Enemies]: Value A(Group.Enemies) = 0
Con [Group.Enemies]: Y position of (Group.Enemies) = Y(Character) – 3
Act [Group.Enemies]: (Group.Enemies) set alterable value A to 1

Con [Group.Enemies]: Value A(Group.Enemies) = 1
Act [Group.Enemies]: (Group.Enemies) Destroy

Image Edited by the Author.

 
<0> ReDhAdEs <0>

Dalal



Registered
  28/03/2004
Points
  307
5th April, 2006 at 15:38:50 -

Thanks,

I'll try your suggestion Redhades. Maybe I should just try every possible combination until I get one that works...

 
.bin there done .dat
   

Post Reply



 



Advertisement

Worth A Click