New guy - Multiple Object problems
Hi there! I just got MMF2 and started out making a nice and fresh platform game :D
I have no clue about programming and such, but I am experienced with other game editors, so I kinda know what they want from me and how I get things to work.
But this is very complex and I'm trying my best to make a good game. And I hope you guys can help me with some advice!
Right now I'm trying to get some cool enemies in my game. I try to make them on my own and I got one simple enemytype to work. It's just a guy who runs straight forward and if it hits an obstacle it turns around and walks the other way. But now I'm trying to make a harder enemy - one that bounces around.
Look at my test file - http://www.paulinthenet.de/download/monstertest.mfa
As you can see, the head bounces around just fine (it's a bit too fast, but I have no clue how to manage the speed)...
But as soon as I place another one, they just bounce around very weird and start flying in the sky! I have no idea how to fix this problem :/
Please help!
And it would be very nice if anyone could tell me a tutorial for how to make platform enemies. I want to make a lot of different enemy types for my game (like mario or zelda2, where spiders hang from the ceiling and drop down to the player... wow I would really like to know how to make THAT!). My enemy is extremely simple and I already spent about two days on this one... and it's not even working ;)
Re: New guy - Multiple Object problems
Hi Blue66, welcome to the forums!
Your problem seems to lie in the way that you're using a fastloop movement (I'm actually surprised that you're diving straight into these, being new to the software, but it looks like you've got the hang of it.)
The problem you're having is due to the way that MMF selects the objects to perform actions on - if a specific object isn't mentioned in the way it expects, then it'll perform actions on all the objects of that type. In event 10, for example, pulling your "Headdetector is overlapping a backdrop" condition up so that it's above the "Headdetector is overlapping Head" condition will correctly select the object to perform the action on.
(In honesty, I'm not entirely sure why in this case one way round works and the other doesn't... I'll have to ask about that.)
Similarly, during the movement loop, MMF is performing the actions on each of the "head" objects if one fulfills a condition. You can work around this by assigning each object an individual value by using the "Spread value" action (on an alterable value that I'll call ID), then starting a loop [the number of enemies in the frame] times and only performing actions on them if their ID matches the loop index.
I'd do up an example, but I'm at work at the moment - I'm sure that there are examples of handling individual objects in fastloops in the File Archive forum.
Edited to add: This one might help. http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Board=5&Number=38450
Good luck!
Re: New guy - Multiple Object problems
Headdetector is overlapping a backdrop
Headdetector is overlapping Head
Will select all "Headdetector"s overlapping backdrops, and then all of those that are overlapping a Head, and also select the "Head"s they are overlapping. The result is that any actions you do on "Head" in this event will only affect Heads that are overlapping a detector that is overlapping a backdrop. This is probably what you want.
Headdetector is overlapping Head
Headdetector is overlapping a backdrop
Will select all "Headdetector"s overlapping a Head, and also select the "Head"s they are overlapping. It then selects all of those "Headdetectors" that are overlapping a backdrop, leaving the Heads that are overlapping a detector that ISN'T overlapping a backdrop selected. Any actions you apply to a Head in that line will then affect any Heads overlapping a detector, even if that detector isn't overlapping a backdrop. This is probably not what you want.
Does that make sense? It's kind of confusing to explain.
Re: New guy - Multiple Object problems
Well, thank you guys so far, but I still can't get it to work :(
What is a spreaded value? And how do I do this? Right now all my knowledge comes from some tutorials (I got the fastloop things from them) but I can't find anything about how to make decent enemies which act kind of clever so the player has to watch out.
And is there a way to slow the speed down?
Anyways, I would be glad if only those heads would work right ;)