How to count actor in the scene
calvin9403
Member Posts: 3,186
I am making a game that has a lot of levels,I want to count my actor in the scene(so I can display the you win actor). I try the tutorial, but it did not work. Any proposal?
Comments
Then put a change attribute behavior in the prototype of the actors that does
change game.actorcount to game.actorcount +1
Dont put it inside a rule and it will count all of that actor on the scene when it loads and increase anytime you spawn more of that actor in that scene.
but it did not work
BTW when the actor is destroy I what it to minus1, so I did when the lives =0, minus1 to the object_count
P.S there will be a lot of the some actor in a scene
is it 0
and aiso, can you explain how will it work I can not let it the attribute add up
I did this: drag the change attribute to the area the first box I said object_count to object_count-1
is it corret
What you just typed is what will drop the count by 1 each time an actor is destroyed
Can you explain more about your project and what you are using the count for?
I am doing a project like you use a ball to break the candy(something like crazy ball wall breaker )
and I have a few question
1.i want to make a you win screen after I beat the level,and I have 480 levels,so I have to do something like coin count,or if you have other way that helps
2.if I have 5 same candy in a level, when I destroy one, others get destroy too,but i do not want that
P.S. are you always going to be online
Based on the crazy ball wall breaker demo it should be a piece of cake to set up a "win Screen" based on the blocks count equaling 0 Not sure why it would destroy more than one unless your basing the destroy on attributes or something and not just a collide.
Why don't you email me at tenrdrmer(at)yahoo.com so we talk more in detail about your project.
And yeah i'm online alot. it kinda comes and goes
and in the demo, there is only one level, but i have almost500, so i can not use that way