I'm guessing you create an integer attribute you could name 'hitpoints' in the actor and set it to change that attribute +1 every time it gets hit. And then have another attribute (most probably a boolean) named 'kill' that destroys it after hits = 4.
I'm sure the pros in the forums can fill that in better, but that's how I'd start playing with it.
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
Go into your the actor you want to destroy after it gets hit four times.
Make an attribute in that actor that is an integer call it hitpoints and set it to 4.
Then make a rule that says: When overlaps or collides with (whatever you want it to collide with when it needs to be hit 4 times)
Change attribute self.hitpoints to self.hitpoints-1
Make another rule: When attribute self.hitpoints = 0 Destroy.
Then make an ACTOR attribute also named hitpoints? Maybe name the actor attribute myhitpoints to cause less confusion? That wouldn't affect it, would it?
But why make a game attribute at all if it's not referenced in the actor rules?
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
No, just make an attribute for the actor, not a game attribute.
So it works, thanks! I have a new problem. The actor does not show up during game, but i have it up front, as in i selected layer, move to front. I also put it a background (not the original one), maybe thats the problem?
Braydon_SFXMember, Sous Chef, Bowlboy SidekickPosts: 9,273
Could be, but make sure that the alpha is = 1 which means it's not invisible. :P
Comments
I'm sure the pros in the forums can fill that in better, but that's how I'd start playing with it.
Make an attribute in that actor that is an integer call it hitpoints and set it to 4.
Then make a rule that says:
When overlaps or collides with (whatever you want it to collide with when it needs to be hit 4 times)
Change attribute self.hitpoints to self.hitpoints-1
Make another rule:
When attribute self.hitpoints = 0
Destroy.
That should work, good luck
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
first: make a GAME attiribute named hitpoints.
Then make an ACTOR attribute also named hitpoints? Maybe name the actor attribute myhitpoints to cause less confusion? That wouldn't affect it, would it?
But why make a game attribute at all if it's not referenced in the actor rules?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Hope this helps, Jack