I wanted to clarify the conditions when trigger once while true is really needed. For example I had a situation where game created sprites and invisible sprites that had a touch trigger on them.
Game went very slow and I realized that my condition was a global variable (Thisthing=1) and event was create object a (and b etc etc)
Then I realized that it created them all the time and game became very slow. So I put there this trigger only once additional condition.
It would be good to know when these are needed. For example if there is a condition that turns sprite to zero angle.
(and it has done it). Does it still do it everytime or will the game just "see" it that the sprite´s angle is 0 and does not try to do the command.
So in a nutshell: Is it more efficient to a) put there a additional condition: sprite angle <> 0 or is it faster to just let the game try to check the angle.
Which one is more efficient in a game sense meaning which are the things and solutions that are faster than slower (sorry english is not my primary language)
I wonder if we could actually make a list of common solutions that work better than the other and has the same kind of an outcome.
For example: Which one is the best way to bring a sprite into a play. a) another object spawns it b) it´s already there hidden somewhere and it´s repositioned or c) create object
Set animation to default
Then the animation is default. Should the game check it all the time and put the animation to default even though it already is or does the game check that: animation is already default and does not have an impact on it (does not do anything).
I wonder if there are many conditions it would slow down. For example in the previous example. Should there be an extra condition:
if animation is not default then set it to default.
or just simply:
set animation to default (no matter what, even if it already is default)
Which one is a better practice?
Yeah. Depends on the situation is probably the easiest answer but certainly people that have a lot of experience have a somekind of a feel that which way is the best to approach.
So I think that we need those experienced solutions that game maker should try first. There are a lot of tips and tricks spread all around these forums and those tidbits should be put into a same place where they are easily found. Common practises or something like that.
Like this way:
All triggers should be on top of events
All ticks should probably be on the same action
Avoid too many sub-events
Always create object and not use spawn object if possible (or vice versa)
wait for 0 seconds (sometimes very useful even though not intuitive)
What kind of conditions are best working when something occurs only once or all the time.
Condition can be left empty!
All kinds of stuff.
Sure there are many of this info available but somekind of a experience must have been built that which solutions work faster than others.
Sorry for my english.