The Daily Click ::. Forums ::. Klik Coding Help ::. Newbie question about path movements
 

Post Reply  Post Oekaki 
 

Posted By Message

Ted Boomerang



Registered
  04/10/2002
Points
  144
20th March, 2007 at 18:55:21 -

Hello!

I've been working on this game and I'm a a little embarrassed because this seems like such a simple thing to figure out, but I'm stumped

I'm using a path movement to make some basic enemy flight patterns (I know, lame) but when I try to destroy an object after it reaches the end of it's path, it destroys ALL like enemy objects. I get this same problem with and without qualifiers. I'd substitute an event like having it destroyed when the enemy leaves the frame, but most of them are created outside the frame and would get destroyed before they even started

Any ideas?

 
Ted Boomerang-

Ted Boomerang Productions

Ted Boomerang



Registered
  04/10/2002
Points
  144
20th March, 2007 at 19:32:13 -

Small update:

I just tried to do an event where when the object reaches the end of it's path, it sends it's fixed value to a counter, only destroying an object when it's value is the same as the counter. Surprisingly, it also destroyed all the enemies o.O

I'm even more confused now

 
Ted Boomerang-

Ted Boomerang Productions

nim



Registered
  17/05/2002
Points
  7234
20th March, 2007 at 19:34:25 -

Hello!

Try this:

"Active" has reached end of path
and
"Active" has reached end of path
(same condition twice)

-Destroy "Active"

Image Edited by the Author.

 
//

Ted Boomerang



Registered
  04/10/2002
Points
  144
20th March, 2007 at 19:40:44 -

Works like a charm

o.O freaky.

Thanks for the help, Nix. I'm actually kind of glad the answer wasn't so obvious, otherwise, I'd feel like a total idiot.

Now if we could just figure out why it has to be that way. My only guess is that the first time it checks for the event, the second time it checks for the condition

 
Ted Boomerang-

Ted Boomerang Productions

nim



Registered
  17/05/2002
Points
  7234
20th March, 2007 at 19:49:01 -

Yup - only one condition applies the action to all "Active" objects when any of them meet the condition. Using two conditions forces it to check only the instance that meets the condition. I can imagine situations where you might need to use either. Good luck with your game ^^

 
//
   

Post Reply



 



Advertisement

Worth A Click