Actors and regions question

Almakos

  • Posts: 632
Hi,
I want enemy's bullets to disappear when they enter a region, which I created on a scene. What is the right way to do this?
I was trying to solve this through scene behavior and through actors behavior, but I get or 1 last bullet to disappear or all bullets disappear all-together.
Thanks.

« Last Edit: June 06, 2012, 10:00:29 pm by Almakos »
Fishing Fantasy Trailer


Satyre

  • *
  • Posts: 270
I can not think about a way to handle it with regions, but with actors that act like regions.

I would create a blank actor that kills the last collided actor when the animation is as like the bullet animation or when the two actor types match like this:

Actor behaviour > Add Event > Collisions > Collisions between... > type and type

I put the if part in to be sure to not kill another actor that collides with the blank actor.

« Last Edit: June 07, 2012, 03:49:02 am by Satyre »

Almakos

  • Posts: 632
Thank you Satyre. I understand this way, but now I cannot find where to get "Last Collided Actor"  :o
I have only "Last Created Actor"
Fishing Fantasy Trailer


hansbe

  • Posts: 262
Can you just drag "1st actor" or "2nd actor" over last created actor and it will be replaced. ?

Satyre

  • *
  • Posts: 270
It must be an actor behaviour. I edited the text above, cause I wrongly wrote scene behaviour. It should be available when you create an actor behaviour.

Otherwise hansbe is correct with the drag of the second actor part into the "last created actor" region above :)

Almakos

  • Posts: 632
Thank you guys, I will try that as soon as I get home. I am sure it will work.
Thanks again =)
Fishing Fantasy Trailer


Almakos

  • Posts: 632
Works perfectly fine.
But why if I set bullet's Actor Type to "Cannot be pushed", it doesn't work?
"Normal" works correct though.
Fishing Fantasy Trailer


KrisSach

  • Posts: 7
I believe that's a problem with Box2D, if you need the collision but don't ever want the actor to move, set it's mass to a crazy high level in it's physics properties to create the same effect as "Cannot be pushed" :)

Almakos

  • Posts: 632
Thank you, that will do.
Also material better be "Dead weight" or something. Pretty unexpected though...
Fishing Fantasy Trailer