Actor collides with Actor Destroy a different Actor
aidanshaw92
Member Posts: 17
Help please..
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
Comments
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
Thanks, ill give this a go
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
-- destroy actor
is that correct??
Instead of these rules you can create a tag add your 4 actors in like this
then in your character actor
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
Thanks
When the character hits either of the 4 death actors, the barrier will be destroyed and the main character will continue to fall
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.
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
correct! it was very simple.
All done. Thanks for your help> @Icebox said:
@aidanshaw92 You welcome and good luck