Need Some Pro help with Actors

Here is the situation...
I've got 2 actors 1 lets say is a creature and the other is spawning slightly above it (looks like its carrying it). I've got every thing working great, the top object can be dragged off to a point and then you can destroy bottom "creature" and all is good. The problem I'm having and I can not for the life of me figure out how to solve it is this..
If you drag the top object off and then destroy the bottom actor it also knocks off the very next spawned same top object of the next creature. wich I do not want to happen. Any Help would be much appreciated.
I've got 2 actors 1 lets say is a creature and the other is spawning slightly above it (looks like its carrying it). I've got every thing working great, the top object can be dragged off to a point and then you can destroy bottom "creature" and all is good. The problem I'm having and I can not for the life of me figure out how to solve it is this..
If you drag the top object off and then destroy the bottom actor it also knocks off the very next spawned same top object of the next creature. wich I do not want to happen. Any Help would be much appreciated.
Comments
how many creatures/topObjects on the screen at one time?
what triggers the spawn? the creature?
try something like this:
make a gameAttribute Index … leave at 0
make a small spawnControl actor … or in the one you have
Rule: when
Attribute: game.Index = 0
Timer: After: 0.5 seconds √Run to completion
--Spawn: Top
(… drag the control Actor outside the scene display area or uncheck its graphics.Invisible)
in Top:
--changeAttribute: game.Index To: 1 (so spawner doesn't work)
in creature when destroying:
--changeAttribute: game.Index To: 0 (so spawner starts timer)
--Destroy this actor behavior
this should give the actors some separation actions when reacting to user events
MH
Thanks for the quick reply. I actually tried using an index game attribute to solve this before, but not with a timer. I really want to thank you for giving me some direction. I set it up exactly how you posted above. It almost worked, but the problem was that the "Creature" actor is sapwning with a random top object. And when the "Control Spawn" Game index attribute turned the spawn on or off it would cause a pause in the flow. I tried to fix this by setting faster on/off time but it didn't quite work. The other issue then became what happens if the "Creature" runs to off the side of the screen (escapes with out being killed), then the "spawner off" function went with the creature and no other creatures would spawn.
So, before I go any further I'm not trying to be or give any kind of Criticism of any kind. I really did appreciate your post. So Thank you again.
You did spark an idea (and this was such a simple solution for the problem). How I fixed it was I added a game boolean attribute "Kill control" and on the object in the rules for dragging at the top I put a rule that turned "Kill control" to true. Then on the "creature" I had one rule with attributes if "Kill Control" was true and another set if it was false. It was setting up the false rules that ended upbeing the solution to the problem of when creature is killed that does not have an object above it, it knocking the next creatures object off.
Once again thank you for you help, much appreciated.
WOW! @blister, you worked that out Super!
MH
… and it did not show in the preview … nor when I Edit … only when it posts.MH