#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Actor collides with Actor Destroy a different Actor

Posts: 17Member

If I have 3 Actors.

Actor 1
Actor 2
Actor 3

Is it possible to destroy Actor 3 if Actor 1 and 2 are to collide?

Thanks

• Posts: 1,297Member, BASIC
edited May 17

yes create a boolean game attribute call it destroy
if actor 1 collides with actor 2
change attribute game.destroy to true

in actor 3
if game.destroy is true
destroy

• Posts: 17Member

Thanks, ill give this a go

@Icebox said:
yes create a boolean game attribute call it destroy
if actor 1 collides with actor 2
change attribute game.destroy to true

in actor 3
if game.destroy is true
destroy

• Posts: 17Member
edited May 17

For sake of ease I will refer to my character names (character , death 1 , death 2, death 3, death 4, entrance barrier)

The character falls from the top of the screen until it hits the 'entrance barrier' and stays in that stagnant position for the duration of the game.

What I want to happen, is when the character hits death 1, death 2, death 3 and death 4 the entrance barrier will be destroyed and the character will keep falling.

I created a Boolean attribute in the game, called 'destroy'

In death 1 character

-If 'death 1' collides with 'character'
-- change attribute game.destroy to true

In death 2 character

-If 'death 2collides with 'character'
-- change attribute game.destroy to true

In death 3 character

-If 'death 3 collides with 'character'
-- change attribute game.destroy to true

In death 4 character

-If 'death 4 collides with 'character'
-- change attribute game.destroy to true

Within the 'entrance barrier' actor I create a rule that says

• if game.destroy is true
-- destroy actor

is that correct??

Thanks, ill give this a go

@Icebox said:
yes create a boolean game attribute call it destroy
if actor 1 collides with actor 2
change attribute game.destroy to true

in actor 3
if game.destroy is true
destroy

@Icebox said:
yes create a boolean game attribute call it destroy
if actor 1 collides with actor 2
change attribute game.destroy to true

in actor 3
if game.destroy is true
destroy

• Posts: 1,297Member, BASIC
edited May 17

In death 1 character ...

What I want to happen, is when the character hits death 1, death 2, death 3 and death 4 >the entrance barrier will be destroyed and the character will keep falling.

Do you want the character to hit the 4 death actors to open the barrier or if it hits any of them ? If the character needs to hit all 4 death actors to open the barrier then this wont work

• Posts: 17Member

Thanks

When the character hits either of the 4 death actors, the barrier will be destroyed and the main character will continue to fall

@Icebox said:

In death 1 character ...

What I want to happen, is when the character hits death 1, death 2, death 3 and death 4 >the entrance barrier will be destroyed and the character will keep falling.

Now i didnt understand something , do you want the character to hit the 4 death actors to open the barrier or if it hits any of them ?

• Posts: 17Member

So I have set it up as per you images.

Struggling with what to put in the 'entrance barrier actor'

-Rule
--Change attribute
---game.destroy to true
----destroy actor.

I don't think this is correct as the actor has disappeared before the game has started.

@Icebox said:

In death 1 character ...

What I want to happen, is when the character hits death 1, death 2, death 3 and death 4 >the entrance barrier will be destroyed and the character will keep falling.

Do you want the character to hit the 4 death actors to open the barrier or if it hits any of them ? If the character needs to hit all 4 death actors to open the barrier then this wont work

• Posts: 1,297Member, BASIC
edited May 17

Its really simple

Character actor
if overlaps or collides with tag death
change attribute game.destroy to true

entrance barrier actor
if game.destroy is true
destroy

Did you do this and the actor disappeared before the game starts ? the only way it would disappear is if game.destroy is true , make sure the attribute is set to false at default

• Posts: 17Member

correct! it was very simple.

All done. Thanks for your help> @Icebox said:

Its really simple

Character actor
if overlaps or collides with tag death
change attribute game.destroy to true

entrance barrier actor
if game.destroy is true
destroy

Did you do this and the actor disappeared before the game starts ? the only way it would disappear is if game.destroy is true , make sure the attribute is set to false at default

• Posts: 1,297Member, BASIC

@aidanshaw92 You welcome and good luck