Making Spawned Actors Different - Help Please!

megamoomegamoo PRO Posts: 11
edited November -1 in Working with GS (Mac)
Hi all,

Firstly I have searched and searched but cant find anything that may help, so if you can help please do let me know...

My problem is..

I have a single actor (Blue) which is spawned every few seconds,

I would like Blue to be destroyed when another Blue is dragged over the top of it (drag and drop style). I have got this to work (by setting a global and self attribute coupled with the "colide with actor of type rule) however it also destroys any other Blue's on the scene who happen to bump into each other.

Example: Drag Blue1 on Blue2 (destroy blue 2) and blue 3,4,5,6,7 are all destroyed too!

Is there a better way to do this? If so can you let me know as I am tearing (whats left) of my hair out!

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    I am guessing that you have a collision attribute that is global, it must be a self attribute then it will be fixed
    :D
  • megamoomegamoo PRO Posts: 11
    Thanks NextGen,

    Unfortunately I don't have a global collision atribute. What I have is a self atribute which tells if the actor is touched or not, so the rule reads at present...

    When ALL conditions are valid
    Actor overlaps or collides with actor of type "Blue" (so it actor is dragged over another)
    Atribute "self draganddrop" = 0 (and it is not being press, therefore not active)
    Atribute "game. bluepressed" = 1 (but another actor called blue is)

    Destroy Actor

    What I need is a condition which just deletes this one instance of actor and not all of them. I appreciate you help,
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Throw a touch is inside in with that rule and see if that solves your troubles.
    Not sure just spit balling on that one.
    ___________________________________________________________________________________
    TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!

    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • megamoomegamoo PRO Posts: 11
    Thanks tendrmer,

    That does work! It's not perfect (as the actors kind of run away/resist, as want to colide) but it does work and stops others being deleted by accident, I guess I will have to keep tweaking and testing!
  • RHRH Member Posts: 1,079
    You could create a rule that says:
    when actor overlaps or collides with actor of type blue

    and inside that create a new rule that says:
    when touch is pressed

    and in the otherwise of when touch is pressed put a destroy behaviour.

    This way you don't need to use any attributes at all and should do the job.
Sign In or Register to comment.