I can't work out how to track when enemies leave the camera view.
wirelesstkd
Member Posts: 75
Hi guys, I'm back with another newbie question. I think I have a decent enough understand of GameSalad's mechanics, but I can't figure out how to do something.
I want enemies in my game to enter the camera view, attempt to perform an action (moving in a certain way and shooting at the player), and then attempt to leave the camera view, at which point they will either be destroyed or recycled (I'm still not sure why actors get recycled rather than destroyed, but that's a digression for now ).
The player's job is to 1) stay alive and 2) kill enemies before they "escape." I want to set it so that if player goes for a set period of time (like 5 second, for example) without any "escapes," a scoring bonus kicks in. Another way to implement the same thing would be to go for a set number of enemies (like 15 enemies, for example). Either one would be fine.
What is hard for me is coming up with a way to track escapes, relative to either time or enemies entering into the camera view.
I hope I've explained that well enough... would anyone have any idea of how this can be accomplished?
Thanks in advance for the help
I want enemies in my game to enter the camera view, attempt to perform an action (moving in a certain way and shooting at the player), and then attempt to leave the camera view, at which point they will either be destroyed or recycled (I'm still not sure why actors get recycled rather than destroyed, but that's a digression for now ).
The player's job is to 1) stay alive and 2) kill enemies before they "escape." I want to set it so that if player goes for a set period of time (like 5 second, for example) without any "escapes," a scoring bonus kicks in. Another way to implement the same thing would be to go for a set number of enemies (like 15 enemies, for example). Either one would be fine.
What is hard for me is coming up with a way to track escapes, relative to either time or enemies entering into the camera view.
I hope I've explained that well enough... would anyone have any idea of how this can be accomplished?
Thanks in advance for the help
Comments
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
I see that you used the percent sign in that video, too, but I'm still not sure what it does. I tried googling % in algebra, but it wasn't much help. Is this an algebra thing, or a programming thing? I'm pretty weak with both, lol.
Actually, it seems like it prevents the system from doing what it's supposed to do. Removing it causes the how many seconds attribute to increase by one every second and only reset when an enemy escapes. So I think that's what I was trying to do.
Is something going to break later if I incorporate this in to my game without using the percent sign?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx