I was talking about an issue i was having with this in another thread "Spread value" i just want to continue the questioning but in a more appropriate thread. Basicly i cant make one. I have tried everything i know apart from one idea i just had and i was hoping i could get some feed back on its efficancy.
Due to the fact that alot of the tiles in the game are animated, they are active objects and are grouped by a qualifier (neutral). This causes me some nasty problems cause you cannot code using qualifiers in object behaviours. (if i could then i wouldnt have a problem).
i have the engine to point where all enemies on screen are given 4 collision detectors (via a spread value code), i have also implemented a movement system which works correctly. This all works correctly when there is only one on screen, as soon as there is more than one only the first enemy will move, the otheres will just look in the direction they are supposed to move. I imagine this issue os to do with fast looping but i just cant seem to figure it out.
The idea i had was to have some sort of invisible collision map that will be one background object, this way the enemies will collide with this and i will be able to code in the object behaviour.
If you could let me know what you think of my idea and if anyone can fix the mentioned issue with my original movement, that would be better. Any examples would be much appreciated.
It's so very funny that you mentioned that invisible collision map because that's EXACTLY what I'm dong for Equin Legacy's overworld map. Now bear with me because I'm not using tiles or anything but maybe you can figure out something with this below:
Okay, now the enemy A.I. is basically non-existant for the overworld map but it doesn't need to be smart for this part, just the real time battles that take place if one of them hits your character on it.
What I did is I drew the outlines of each continent in black. There are my borders. Then once I was done I used a paint fill to fill up all the ocean areas and other water that I knew my guy wasn't going to be able to cross. So what's left is a big black picture with white continent shapes on it. These white areas I made the transparent part of my "mask" active object.
Now the cool part is that I went back to my outlined world (I saved a backup copy) and drew the actual world map on top of it so that instead of black outlines and crap there's grass, trees, desert, etc. For the water I made 3 or 4 copies of this map to make the water look animated and good. Lastly I took the "mask" active object and put it down on the frame, and the animated "show" map and put it directly on top of the mask so that everything lines up nice.
When you move the guy around, the movement checks collision against the mask and not the actual showing map because it's just black & white and very easy to make the decision. And the best part is that it works perfectly like how I wanted it to. There may be better ways (and I'm sure there are) but maybe you could do something like this? Personally I've never done tiles with MMF because it seems like a giant pain, which I'm sure you've already discovered yourself. In the past in VB I'd use some big array and a lot of needless code but it seemed to get the job done (eventually.)
--
"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!
Damnit, just tried it and still only one of my enemies will move, I just cant figure it out, Please i am begging somone to do me a quick example file so i can move past this point. Please....
anyone? or am i forced to sit quitely, alone with a failed project filling my many coffee mugs with salty tears of failure. Please people, this is childs play to some of you but its project ending for me. im almost begging here.
Well, all I'll say is back when I had no internet and couldn't figure out how to make a certain part of my game work I just figured out other ways to do it myself or change it into something that I COULD do. I know this sounds like crap advice, and probably is, but does your game REALLY need to have your enemies act and work this way? Can it be done some other way? If you're going to have the battle be turn-based surely you can think of another way to move the enemies from place to place?
--
"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!
im only tryinh to get them to randomly move on a grid movement, but somthing happens to my code when there is more than one. ive been told its a fast loop problem but thats like throwing a book at a monkey and expecting an essay.
- Always
--- Start Loop 'My Loop' 'nObjects(Enemy)' times
That literally means start a loop for every Enemy.
Then, in the loop conditions, do this:
- On Loop 'My Loop'
+ ID of Enemy = Loopindex(My Loop)
--- Do whatever actions you had in mind
The +ID of enemy = loopindex isnt possible, it doesnt give me that option, all i get is
"Get loop step" and "get number of loop steps" what do i do now?