Users browsing this thread: 8 Guest(s)
Super Marisa World FUSION (working title)
#14
(10-04-2014, 02:08 PM)Midi Wrote: I think I see your problem. You're setting stomp to 1 if it's at 0, but then never setting it back to 0 before it goes to what I assume is the code that tells him to start throwing an enemy. You really should comment your code more, though.
Well, there isn't really much to comment in the first place. I could try, though:

Code:
//Movement Code
if fly = 0
and ready = 0
and throw != 1
and throw != 3
and defeated = 0
{
    if hitpoints <= 2
    {
        if stomp = 0
        {
            move_towards_point(obj_mario.x,192,3) //Fly towards the ground, where the player stands
            stomp = 1 //In a straight line
        }
        if hspeed > 0
            direct = 1
        if hspeed < 0
            direct = -1
        if ballcounter > 0
            ballcounter += -1
        if ballcounter <= 0
        {
            if stomp = 0
            {
                alarm[7] = 1 //Time to drop
                ready = 1
                throw = 3
                ballcounter = 1
                vspeed = 0
                hspeed = 0
            }
            else
                ballcounter = 0
        }
    }
    else
    {
        //Code that has nothing to do with the problem
    }
}
And yeah, I had to do it that way, or otherwise, the flying towards the ground part wouldn't work.
Oh, and I forgot to post the Alarm[2] code:
Code:
if y <= 64

{
    vspeed = 0
    hspeed = 0
    stomp = 0
    if muteki = 0
        alarm[9]=30
}
else
{
    if muteki = 1
    and hitpoints = 1
    {
        if y <= 64
        {
            vspeed = 0
            hspeed = 0
            stomp = 0
            if muteki = 0
                alarm[9]=30
        }
        else
        {
            vspeed = -3
            alarm[2] = 1
        }
    }
    else if stomp = 2
    {
        if y <= 64
        {
            vspeed = 0
            hspeed = 0
            stomp = 0
            alarm[9]=1
        }
        else
        {
            vspeed = -3
            hspeed = 0.5*direct
            alarm[2] = 1
        }
    }
}
In Alarm[2], the vehicle flies back up again, with stomp=2, and if reaching a certain height, it's stomp=0 again, and the vehicle can fly towards the ground again.

EDIT: After more rewriting, the stomping and dropping finally works correctly. Sadly, I have discoved a very serious bug, which already was there for quite a while, but which I haven't noticed until today: The music doesn't loop.
Gonna address that bug at MFFA and see, if someone finds a solution to the problem.
Reply
Thanked by:


Messages In This Thread
RE: Super Marisa World FUSION (working title) - by TrinitroMan - 10-05-2014, 02:23 AM

Forum Jump: