Add an actor that covers the entire screen area. Turn off the visible attribute and move it to the back of the scene/layer. Add a rule that checks for collision/overlap with actors with the tag you mentioned. In the 'otherwise' section of this rule add the logic for the scene change.
#2
Create a global integer attribute (I'll call it `EnemyCount`). In each of your enemy actors, add a logic that increments EnemyCount.
`Change Attribute: EnemyCount to EnemyCount+1`
In the logic that destroys the enemy actor, add another `Change Attribute` that decrements EnemyCount, `EnemyCount -1`
In another actor that is always in the scene (a lot of people have a dedicated "scene control" actor), add logic that checks for `EnemyCount=0`. That would trigger the scene change. You may want to delay this logic with an "after" timer, that would give the increment logic time to build `EnemyCount` above 0.
thanks, now is there a way to do the same thing but only if by chance all the actors are destroyed? say that all the enemies and you are destroyed can i have ti change to another sean in that case?
barkbark00 said: I can think of a few ways you could do this.
#1 (probably not the best...)
Add an actor that covers the entire screen area. Turn off the visible attribute and move it to the back of the scene/layer. Add a rule that checks for collision/overlap with actors with the tag you mentioned. In the 'otherwise' section of this rule add the logic for the scene change.
#2
Create a global integer attribute (I'll call it `EnemyCount`). In each of your enemy actors, add a logic that increments EnemyCount.
`Change Attribute: EnemyCount to EnemyCount+1`
In the logic that destroys the enemy actor, add another `Change Attribute` that decrements EnemyCount, `EnemyCount -1`
In another actor that is always in the scene (a lot of people have a dedicated "scene control" actor), add logic that checks for `EnemyCount=0`. That would trigger the scene change. You may want to delay this logic with an "after" timer, that would give the increment logic time to build `EnemyCount` above 0.
How do I add logic to check for this i cant seme to figure this out when i create a rule that says when this is set to 0 it freezes
I'll post a demo of what I am talking about tomorrow afternoon. For now I'm gonna sleep (2 am, yikes!) and then there's my sucky job to contend with....
barkbark00 said: I'll post a demo of what I am talking about tomorrow afternoon. For now I'm gonna sleep (2 am, yikes!) and then there's my sucky job to contend with....
Comments
#1 (probably not the best...)
Add an actor that covers the entire screen area. Turn off the visible attribute and move it to the back of the scene/layer. Add a rule that checks for collision/overlap with actors with the tag you mentioned. In the 'otherwise' section of this rule add the logic for the scene change.
#2
Create a global integer attribute (I'll call it `EnemyCount`). In each of your enemy actors, add a logic that increments EnemyCount.
`Change Attribute: EnemyCount to EnemyCount+1`
In the logic that destroys the enemy actor, add another `Change Attribute` that decrements EnemyCount, `EnemyCount -1`
In another actor that is always in the scene (a lot of people have a dedicated "scene control" actor), add logic that checks for `EnemyCount=0`. That would trigger the scene change. You may want to delay this logic with an "after" timer, that would give the increment logic time to build `EnemyCount` above 0.