1
Ask a Question / Re: a billion+ questions (and some few copied tips)
« on: May 14, 2020, 12:09:04 pm »at logic/scene behaviors is where my 2 actors are getting created-
at first i thought, since i m telling the app to create named actor,
it should know who is who,
The app will create the actors, but it's your job to keep track of them. You can set attributes for them, kill them, hide them...it's all on you. The app's job is to do what you tell it to, and nothing more (unless there's a bug

but when i went to attach the scene behavior to the scene,You can add actors in a scene with code or directly in the scene editor, and that's why it's asking you which actor is who and who. There's also the option to use an actor attribute for actors that you create with code (as you have)
it asked me which of the placed actors was who and who,
..when no actual players are even at the scene,
so where is my mistake in this attached below?
I remember when I first made that mistake

The created event that you have there will only run once when the scene or actor get created and that takes less than a frame. So all your code starts and finishes in less than a frame. You create your actors and then you check if the mouse is pressed on your correct actor. Now what are the chances that you press the mouse exactly in the frame that the scene gets created?
Remember that the code in your Created event runs only once then it stops, so if you want to always check if you pressed the mouse on your actor you can use the Always event or you can use the When the mouse is pressed event listener (there are multiple ways of achieving the same result)
Q: when placing font and creating text, that text can be used as actor ?I don't think so, but don't quote me on that.
Q: when deleting a set background, or some times even by changing the appearance,
things go weird and actors are no longer placed properly, is it a bug?
I don't remember ever deleting a background, so I can't tell. Since there are multiple ways of achieving the same result, you'll eventually find a different way
