im trying to make a platformer with enymies that will always move twords you and when they are close enough, start shooting at you. PLEAZE HELP ME!!!!!
im trying to make a platformer with enymies that will always move twords you and when they are close enough, start shooting at you. PLEAZE HELP ME!!!!!
What are you having trouble with?
What you asked falls just barely short of 'make my game for me'...
Are you having trouble making them move, or are you having trouble making them move around obstacles (pathfinding) are you trying to figure out how to do line of sight... come on help me out here man!
EDIT: Also, people are going to take you more seriously if you DON'T put all the extra crap in the post title.


1. Add some kind of platform engine to the enemy's Behaviour
-search for Mario Style Platform Engine, it's good for this purpose (no detectors for moving the object etc.)
2. Change the engine so that the enemy moves by itself (replace "when move left key is pressed" with something like always etc.).
When player's x-position < enemy's x-position, then set enemy's movement direction to left and vice versa.
3. You might want to add an detector to detect when the player is on decent range, restrict actions for some time (like 0.5sec if you want the enemy to shoot every 0.5 sec) and add that "shoot an object" there..
... And that's it.
I would do it something like that:
1. Custom movement for enemy, like Teknikaali said
2. Now add event which will detect enemy in player zone:
-Every 00:01
+X("Enemy") > X("Player") - 256
+X("Enemy") < X("Player") + 256
+Y("Enemy") > Y("Player") - 256
+Y("Enemy") < Y("Player") + 256
and then enemy have to stop and shoot :P
where do I find a Mario style platform engine


I meant this one:
Mario-Style Moving Objects (Improved) by Parth Dalal
Edit:
It's made using MMF 1.5, but it is possible to open it with MMF2.
Ahh.. it was archived, so I had to use Google to find it
It's not completely ready for what you are going to do, but with a little tweaking with the shooting events etc. you should get a fine enemy AI out of it. (using Pasiunia's and mine advices as help)
Edit edit:
There really are some nice examples in the archives.. you could find some diamonds from there if you look hard enough :>
what do I change to make it move towards me!!!!


I replied to here, try to keep one thing in one thread, so I don't have to answer 2 times in 2 different threads ;pOriginally Posted by Beginier
The object turns direction when its alterable value "Speed" is changed from positive to negative (positive goes right, negative goes left).. so setting it always -5 would make the object go always left and vice versa. hope this made things clear..
THX alot but is thier anyway i can make the enemy jump? and out of curiosity, how does it know when it hits a wall? also is thier anyway to make it jump if it hits an edge and the player is above it? also I want to make a wepon that is not part of the enemy that allways aims at you, I know how to do this for a player but when I have tried it with a enemy it ends up just setting them all at one enemy.


Jump (every 1sec for instance..) :
Every 00:01:00
-Set "Gravity" to -10
So:
"Gravity" is an Alterable value of the enemy (falling enemy = positive numbers so negative = going upwards). You could add your own events like "enemy hitting an object -> jump" and so on..
The wall detection: no idea, but it works..
Weapon: I think you need to use Spread Value here.. but I don't know about that enough to teach it. There has to be many threads about it..