No collision with invisible actors.
As_Of_Latte
Member, BASIC Posts: 343
Hey guys,
I have a rule that spawns a random actor every few seconds. The random actors are chosen from a set of 10 images I've made. Out of these 10 images, I have 8 visible actors and 2 "invisible" actors.
I made a separate rule for the "invisible" actors like so;
-When self.image is "Image10.png"
--Change attribute self.Color.Alpha to 0
I've set a behavior that states if random actor collides with hero, game is over.
My question is; If a random "invisible" actor is spawned, how do I turn off the collision behavior with the hero, so that the game can continue?
Comments
I assume your collision rule is set up like this:
Add another condition:
Since you're changing the alpha to 0 when it's an invisible image, this new rule will only fire when it collides with the hero actor who's alpha is set to 1.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Make sure the collision rule is in the 'random' actor.
Then add another condition to the rule:
Edit: Beat to it by Braydon!
It can get a little confusing when people use 'actor' and 'image' interchangeably (to me at least).
If the actor is invisible and does't interact (collide) with the hero then could you not simply delete it ? Or does it have some other function ?
Thanks @Braydon_SFX and @RThurman that worked!!
@Socks I apologize if my wording was a little confusing. I'm still trying to get the hang of things, here in the Forums lol .