In dire need of advice about lagging!
i really need some advice about how to get your game not to lag as much there are a couple of things that i have learned from tshirtbooth that i have learned as far as unchecking the movable button if the actor is not movable and unchecking visible if the actor is not visible but my game still tends to lag... now of course there are some things that are spawning from time to time but i check the actor to make it destroy when it hits a certain wall... can someone please give me further advice so that i can assure that my video game is at its highest quality. thanks so much

Answers
Ace
every (random 1,5) seconds change velocity direction 180 with a speed of 320 relative to actor
*rule* if any conditions are valid
if actor overlaps or collides with actor of type: 1 banana, 2 bananas, or 3 bananas change attribute self.position.x to self.start x and another change attribute self.position.y to self.start y
for some reason it keeps on spawning at the bottom of the screen...
now this is a concept that i really need to grasp because i have another game where i need to use the recycle behavior and i feel like a lot of the games that i have will need to use the recycle behavior because i have tons of games in my mind where i can find this useful... @tshirtbooth it SORTA clicked when i was reading your last statement but I'm totally not grasping this for some reason and its frustrating. this is the final game that i have to complete in order to publish them all on the market (3 total). I'm trying to gain insight on how this works because now working with game salad my mind tends to think in code ALL THE TIME lol even when I'm walking to the store or especially when I'm playing a video game... but this is just one concept that I'm not fully understanding so if you can explain more thoroughly that would be awesome! again i apologize for continually asking but if i understand this concept fully i will be able to make whatever game i would like without the threat of there being lag.
thanks @tshirtbooth!
Gamesalad isn't so good at spawning. So it's better to recycle. Basically, you just put your actors out of sight (outside of the limits of the visible area of the screen), until you need them. When you need them, you move them to the spot you need them in. After the actor is "destroyed", or useless, you just move the actor outside of the screen again. And repeat.
This is troublesome when you have lots of actors that need to be spawn, but it does help on the lagging.
If actor overlaps or collides with actor with tag (will come to the tag bit in a minute)
Change attribute self.position.y to -(self.size.height/2)
Couple of notes:
Firstly, instead of bogging your rule down with listing the different collides, click the Home button in the creator, then click the Actors tab. In this window, you'll have a list of all your actors. On the left hand side, there'll be a grey panel with All written in it. At the bottom of that, click the plus button and type Banana as the name. Now click the All button just above the Banana one you just created and drag all of the actors that you want to collide in to the Banana one you just created. In your original rule, instead of having all of the different collide conditions, just have collide with actor with tag: Banana
Secondly, when I put -(self.size.height/2) I am basically just moving it's y position to below the visible screen, so if your actor is 100 high, I'm moving it to -50 so it can't be seen. You can pick a different number here, just make sure that the position you are moving it to is off the screen.
Ace
Ace
hello@mynameisace.com
Ace