Just wanted to put a thread for all the MMF knowledge you wish you knew earlier, but didn't
- There are only a limited amount of flags in MMF. 32, I think. Setting a flag 1000 or flag 192 means that you could be overwriting one of those flags.
- MMF by default uses integers, and up to a certain amount of digits. So, if you made a code that does 3/2, it could result in 1.5 in some places and 1 in some other calculations. To convert it to have decimal places, make it (0.0 + 3)/2
- Pressing the 'Next' button in the expression editor, automatically highlights the next empty space there.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
A global active object will keep it's alterable values across frames, whereas a non global active object's alterable values will all be reset to 0.
This basically lets you have more global values.
If i knew this when i only had The games factory 1, it would have made making an rpg much easier.
random() is base 0....
shut up, that still screws me up
if it screws you up or base 0 confuses you:
random(2) will give you either a 0 or a 1
if you don't want a 0 at all a simple fix would be random(2)+1 [which gives a 1 or a 2 ]
simple but might be useful to know
thinking is like pong, it's easy, but you miss sometimes.
spreading values and starting fast loops in the same event will not work, you must spread the value in one event, then in the next event, start the fast loop
Originally Posted by Ricky spreading values and starting fast loops in the same event will not work, you must spread the value in one event, then in the next event, start the fast loop
this one is really a pain. Some times coding is easier to read if you just start loops in a separate event ALL the time.
Oh and this is a repeat:
When a fast loop is called, the game will load ALL the fast loop events and check if the string is the same as the loop it is on, for each loop run. So you need to put your loops into event groups that are opened before the loop starts, and closed after it finishes, or else just running too many loops will slow down your game
Originally Posted by Ricky Be wary of using the "NOT overlapping object" condition
It will not test true if none of those objects exist
You can work your way around that by doing this
Always - Set flag 0 off (any flag will do)
X overlapping object Y - Set flag 0 on (obviously the same flag as above)
If flag 0 is off (you guessed it, same flag) - Whatever you want it to do while not overlapping
- Ok, you must admit that was the most creative cussing this site have ever seen -
Oh, on what Liquixcat said, the built-in random function is not very random! Use the MT Random object instead, but the MT isn't very random either on some computers.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Originally Posted by Ricky Be wary of using the "NOT overlapping object" condition
It will not test true if none of those objects exist
You can work your way around that by doing this
Always - Set flag 0 off (any flag will do)
X overlapping object Y - Set flag 0 on (obviously the same flag as above)
If flag 0 is off (you guessed it, same flag) - Whatever you want it to do while not overlapping
another way is simply checking if objects exists first
Count X no objects > 0
Count Y no objects > 0
x not overlaping y
GROUP OF EVENTS
It can easily be used to create different weapons system, pause system and many more.
PAUSE SYSTEM
making a inventory or a menu call that pauses the game behind.
Simply make two groups MENU and GAME... and disable/enable them.
WEAPONS SYTEM
If you are making a shooter with 9 weapons don't make it complicated. just make one first in a group and copy that group 9 times.
customize them and make active only the one that is currently equiped.
WEAPONS SYTEM
If you are making a shooter with 9 weapons don't make it complicated. just make one first in a group and copy that group 9 times.
customize them and make active only the one that is currently equiped.
Thats what I did for Lil' pirate. But at first I was a bit of an idiot and put all the projectile and collision events in the same groups so when you change your weapon, the bullets froze in midair lol.
Originally Posted by Cecil youre points say you are negative leet
That's because I'm not leet
something useful:
Have a sweet engine on one file and working on another game but don't want to rewrite the code?
Get your working engine, rename the char the engine applies to to the name of the new char and copy and paste the events... wala auto links to new char
thinking is like pong, it's easy, but you miss sometimes.
Oh, very important:
Legibility of your code is much more important than coding it quick or making it efficient. It can save you hours of debugging.
Also, for events with a lot of actions that take up the whole screen, it's good to split it up into other events. E.g.:
On loop "X"
[Action1]
....
[Action62]
..should instead be...
On loop "X"
Start loop "X0" once
...
Start loop "X6" once
On loop "X0"
[Action1]
...
[Action10]
On loop "X1"
[Action11]
...
[Action20]
(and so on)
It takes 6 times more events and loops, but it's much, much easier to read. You could always use a Nifflas-Pixelthief fast group if the extra loops become a burden on the core, but it saves a few days on debugging and many more days of headache
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.