Hi guys.
Last time I asked you something on this forum, you helped me a lot, so I will bother you again, hoping to be helped this time too.
I have 2 problems :
1) I want to create a single level but with different backgrounds.
For example :
If a Global Value is setted to 1, then entering the level you have to see a sunny background.
But if you enter the same level and the Global value is setted to 2, then you have to see a rainy background.
Any ideas?
2) How many object can I put in a level before it will collapse?
Speaking of the previous example...
If the Global value is 1, I want black enemies in the level.
If the Global value is 2, I want white enemies in.
So, assuming that there are a lot of possible values, that would mean also a large amount of monsters in the level.
I will of course destroy each enemy I don't need in the level when it will be loaded, but still I'm not sure that's a good way to do it.
So how can I do it?
Ummm the enemies can be one object, with different animations for each color, so u don't have to destroy them. But both ways are okay.
The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.
I don't for sure how many objects to crash, but when i set bout 2000 objects it lagged as hell.
Ill say round 500 is okay.
Originally Posted by Don Luciano Ummm the enemies can be one object, with different animations for each color, so u don't have to destroy them. But both ways are okay.
The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.
I don't for sure how many objects to crash, but when i set bout 2000 objects it lagged as hell.
Ill say round 500 is okay.
Thank you for the quick answer!
Well, I didn't think that way for the backgrounds but I suppose it would work great!
So thanks... I will try it!
Regarding the enemies, I tought about that trick too, but it couldn't work.
That's the problem :
First of all, each enemy has arleady at least 4 animations (stand, walking, attack and dying).
The second problem is that I have a lot of different enemies.
The game is a GDR and what I'm talking about is the fighting screen.
So when you enter the frame, the enemies you found will be different according to a global value stored in a file .INI
I was thinking that maybe I can solve the problem in this way :
Instead of having all the monsters in the fighting frame and just destroy the ones that I don't need at the start of the frame, I can just create an unplayable frame and put 1 copy of each monster I have in the game in it.
Then when the fighting frame starts, I just "create an object" from the unplayable frame.
Do you think it could work?
Or there are better solutions?
Making two copies of each enemy (one black and one white) putting all black ones in a qualifier and then all white ones in a different qualifier then destroying one set at the start of the frame strikes me as the best way. Since it's only at the start they'll exist you won't get any lag from it.
Yeah that's a good way, the other way can still be to have more animations.
4 animations per global. So every global should be 0,4,8,12:.. not 12345678
If pressed left (animation walking, let's say walking is animation 2)
Set animation value to (global)+ 2.
So the animations (1, 2*, 3, 4), (5,6*,7,8 ) etc...
I don't know if u get what i mean... but its fairly easy since there is no need for additionall events or objects.
Edited by the Author.
Well it's up to you to choose how u want to do it, since both ways are okay. But if u are using a lot of global values, over 10-20, this way could be better while loading.
There is also another way, u can create enemies. So u put each enemy: set not created at start, u set little objects(shrooms) where enemies should be. then based on the global value.
Pick one of shrooms, create enemy relative to shroom, destroy that shroom.
This event will go on until there are no shrooms left, u can even set alt values to shrooms or use different objects, to set different enemies.
Originally Posted by Don Luciano The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.
That's pretty cool I never thought of that, thanks!
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Originally Posted by Don Luciano There is also another way, u can create enemies. So u put each enemy: set not created at start, u set little objects(shrooms) where enemies should be. then based on the global value.
Pick one of shrooms, create enemy relative to shroom, destroy that shroom.
This event will go on until there are no shrooms left, u can even set alt values to shrooms or use different objects, to set different enemies.
THEN
Count no of shroom = 0
loading complete!
Interesting!
That could be a good way to solve my problem.
How can I set "not created at start" ?
I don't see this command anywhere.
P.S. I don't have MMF2
Originally Posted by AndyUK If you use the picture object to load a picture as your background you can even change the background at runtime.
Good to know!
Actually I don't need to do something like that, but never say never
P.S. Would the picture object create any lag?
Paste an active object into background and destroy it, is something that cause no lag, but have a 640x480 picture object on screen does?
well doing anything creates lag,
but i used one in lil' pirate along with 8 active picture objects that scrolled without any noticeable slowdown. It's not anything to worry about.
Interesting!
That could be a good way to solve my problem.
How can I set "not created at start" ?
I don't see this command anywhere.
P.S. I don't have MMF2
I don't know, i only worked in mmf2, where it is in object properites.
U can destroy all on start using an event. Then start the placement.
@Don Luciano :
Thank you very much.
Probably there's no such thing on MMF1.5
What a pity!
Maybe I should move on to MMF2 but I tried it and I found it much less friendly (for example I hate how MMF2 shows the propriety window of an object).
Plus the picture editor is really bad. Isn't it?
Originally Posted by AndyUK well doing anything creates lag,
but i used one in lil' pirate along with 8 active picture objects that scrolled without any noticeable slowdown. It's not anything to worry about.
Well, I will download lil' pirate just to see how it looks
Thank you!