well if you don't actually mention the problem we won't know if we can help you or not
What do you need?
Well for now I just wanted to know. I wasn't really sure if this was a thread just for games using
certain programs or not.
I'm working on making a Megaman X fan game, and it uses my favorite bosses throughout the sprite-like series (X1 - X6). I've got really great progress on it too besides coding bosses. I'm working on getting the attacks in for
Izzy Glow from Megaman X5. I wanted to start by at random times shooting the
Firefly Laser that X can receive for a weapon. I got it so the missile (Or Firefly laser) can track X and destroy itself if it gets to X or hits a wall. However I'm having trouble getting the trail (the circles following the f-laser) following the f-laser without screwing up the way the missile looks with it. I'm trying to make both the F-laser and it's trail the way you see in fights against Izzy glow himself. Like when he shoots one in the first place, the trail follows the f-laser. Thus it's like the trail is following the same path as the f-laser without changing direction heading towards X (Getting my logic so far? It's tricky to explain for me).

This is the Firefly Laser Missle
Here's the coding and events for the Firefly laser I have so far. In the step event, it's pretty good tracking X without doing
some pathfinding. I'm working on making it so it can go around walls and find X. Which is obj_FAX (FAX meaning
Falcon Armor X).
Create Eventaudio_play_sound(snd_FireFly_Laser,1,false);
if (image_angle= 0)
{
Direction = 1;
}
else
{
Direction = 3;
}
First it will play the shooting sound of the Firefly laser. Then it depends on the angle of the image that Direction will be. If the missile is facing left, Direction is 3. If it's facing right, then Direction is 1. Direction being 2 or 4 means that the missile is either up or down. I don't think I was using Direction at the moment since I'm trying to find a way to make all of this work.
Destroy EventIt just creates an explosion object, and sets the sprite index and custom variable "Missile" on Izzy glow. I used blocks instead of execute code blocks for this because it was pretty easy, and I had to apply different blocks on different objects.
Step EventCollision Script
///Collisions
if place_meeting(x,y,floorctrl)
{
instance_destroy();
}
if place_meeting(x,y,obj_NAX)
{
instance_destroy();
}
if place_meeting(x,y,obj_FAX)
{
instance_destroy();
}
NAX = No Armor X FAX = Falcon Armor X floorctrl is basically an object that controls any stage collsion objects (walls, etc.).
Targeting FAX (I'm using FAX for now in the test room. I'm only worrying about this code, and then gonna copy and paste for NAX).
///Targeting FAX
if instance_exists(obj_FAX)
{
//Missle Rotation
if (x)
{
if (x > obj_FAX.x)
{
image_angle = 0;
}
if (x < obj_FAX.x)
{
image_angle = 180;
}
}
if (x = obj_FAX.x) and (y)
{
if (y < obj_FAX.y)
{
image_angle = 90;
}
if (y > obj_FAX.y)
{
image_angle = -90;
}
}
//Missle Movement to FAX
if (y != obj_FAX.y) and (x != obj_FAX.x)
{
mp_linear_step_object(obj_FAX.x,y,1,floorctrl);
}
if (y!=obj_FAX.y) and (x=obj_FAX.x)
{
mp_linear_step_object(x,obj_FAX.y,1,floorctrl);
}
if (!place_free(x-5,y))
{
x+=1
if y < obj_FAX.y
{
image_angle = 90;
mp_linear_step(x+1,obj_FAX.y,1,false);
}
if y > obj_FAX.y
{
image_angle = -90;
mp_linear_step(x+1,obj_FAX.y,1,false);
}
}
}


And here's the trails, image_index does change randomly as seen in the bottom code.
And now for the missile trail coding. I have two trails for this: One big, and one small. The big trail copys everything the small trail would do, but it has a mask that is for the small trail.
Create Event///Variable Initialization
if instance_exists(obj_Izzy_Missle)
{
Distance = (obj_Izzy_Missle.x + obj_Izzy_Missle.y) - (x + y);
}
Basically saying that if the F-laser missile exists, then distance will equal how far the missle is away from the trail object itself.
Step EventLine 1
image_index = round(random(6));
if instance_exists(obj_Izzy_Missle)
{
if (y=obj_Izzy_Missle.y)
{
if (x > obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x+Distance,y,1,false);
}
if (x < obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x-Distance,y,1,false);
}
}
if (y!=obj_Izzy_Missle.y)
{
if (x > obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x,y,1,false);
}
if (x < obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x,y,1,false);
}
}
if (x=obj_Izzy_Missle.x)
{
if (y!=obj_Izzy_Missle.y)
{
if (y < obj_Izzy_Missle.y)
{
mp_linear_step(x,obj_Izzy_Missle.y-Distance,1,false);
}
if (y > obj_Izzy_Missle.y)
{
mp_linear_step(x,obj_Izzy_Missle.y+Distance,1,false);
}
}
}
if (y=obj_Izzy_Missle.y)
{
if(x!=obj_Izzy_Missle.x)
{
if (x < obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x+Distance,y,1,false);
}
if (x > obj_Izzy_Missle.x)
{
mp_linear_step(obj_Izzy_Missle.x-Distance,y,1,false);
}
}
}
}
else
{
if instance_exists(obj_FAX)
{
mp_linear_step(obj_FAX.x,obj_FAX.y,1,false);
}
if instance_exists(obj_NAX)
{
mp_linear_step(obj_FAX.x,obj_FAX.y,1,false);
}
}
This is basically what it takes to find Izzy's missile. It works "OK", but I want to improve it somehow. When the missile is destroyed however, it will head towards Megaman X and destroy itself when it gets there.
Line 2: Collisions
if place_meeting(x,y,obj_FAX) or place_meeting(x,y,obj_NAX)
{
instance_destroy();
}
The code is self explanatory.