Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Need some serious help! Wierd glitch-GM6  (Read 1220 times)

0 Members and 1 Guest are viewing this topic.
Need some serious help! Wierd glitch-GM6
« on: October 08, 2007, 09:14:08 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 61
I am making a Mega Man X game and I was working with charging the X buster. When I jump, the charging animation freezes, but when I jump and shoot, it cycles normally. WTF is going on!!!!!!!!!!!!!!!!  :P hm.. well here is the .gm6. PLEASE DO NOT STEAL!!!!!!!!!!!!!!!!!! Mega Man X.gm6
« Last Edit: December 25, 2007, 03:42:20 am by 4Sword »
Logged
Re: Need some serious help! Wierd glitch-GM6
« Reply #1 on: October 08, 2007, 09:48:58 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
Hmmm, this line seems to be the culprit in the mega man object in the drawing event:

if global.charge=1{draw_sprite(sprChargeA,-1,x,y)}

The -1 must mean the current sub-image of the sprite_index. When you jump it's only 1 sub-image. Thus the charge will only show one sub-image. When you run it's 21 I believe, and when you shoot in mid-air 6 sub-images, so it gives you the illusion that the charge animation is correct. Alas it is not.

One way to correct it:

In creation event:

charge_index = 0;

In draw event replace: if global.charge=1{draw_sprite(sprChargeA,-1,x,y)} with:

frame += 1;

if (global.charge == 1)
{
    draw_sprite(sprChargeA, frame, x, y);
   
    if (frame mod 10 == 0)
        frame = 0;
}

worked for me.
Logged
  • Pyxosoft
Re: Need some serious help! Wierd glitch-GM6
« Reply #2 on: October 08, 2007, 09:49:13 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
http://www.barrashomesinc.com/MegaManX.gm6

I made the charger it's own object. It is placed using Mega_Man.x and Mega_Man.y in the draw event. This way, the animation frames of the player, as well as the speed do not interfere with the Charger. when you used the variables for gravity it would both effect the player and charger, now ... just the player.
Logged
Re: Need some serious help! Wierd glitch-GM6
« Reply #3 on: October 08, 2007, 09:49:56 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 61
thanx everyone!
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.506 seconds with 45 queries.