MOUSE EVENT ON COLLISION SHAPE/DRAG AND DROP PICKING UP MULTIPLE ACTORS

TheStrangeOne

  • *
  • Posts: 103
I have been trying to find an answer to  this for about a week now but am yet to be successful in resolving the issue. I am using the drag and drop behavior on a screen where multiple actors wander around. It works fine except for when you try and drag overlapping actors, it will pick up all overlapping actors. I have posted this issue before and was told to try using the custom behaviour 'Mouse Even on Collision Shape'. I tried using the custom behavior 'Mouse Event on Collision Shape' but it seemed to do nothing. Does anyone know how to use this custom behavior effectively or how to manually make the drag and drop behavior only move one actor at a time. Thankyou in advance to anyone who takes the time to help, I am working on a deadline atm.

colburt187

  • *
  • Posts: 2416
Ok this one got me thinking, if you look at my game 20 Waves- http://www.stencyl.com/game/play/27246 you can put 2 turrets on top of each other and till pick them up one at a time. Cant see what i did to avoid your problem or if i even experienced it.

But I'm thinking of some sort of solution using a list. Something like when you click on an actor you add them to a list, then only item #0 is picked up. So that way if you click on 2 actors they will both be added to the list but one at #0 and one at #1 and you will need to edit the behaviour so it only picks up the actor at item #0. you may run into problems if all the actors you are trying to pick up are different, i don't think this system will be very accurate.

ETHproductions

  • *
  • Posts: 430
Fontstruct - Stencyl - Website (in progress)

Proud Member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.