25
« on: April 21, 2007, 06:49:19 pm »
Ok, I'm making my little game in gamemaker to try and see how much of GML I can do. But as usual, I've run into a problem...
I started making this in GM6.1, and it worked well, I got many a thing done and then tried to do it portable on my MP3, discovering that GM6 doesn't work on vista >.>
So I DL'd 5.3a and started working on it, but when I tried to get the weapon to attack and dissallow me to attack or mve until the anim has ended.
HOWEVER it isn't working, I don't know whether it is because I used multiple script actions to make it more ordered, but the exact code I used doesn't want to work O_o it gets about 2 frames in and I can move again although I clearly put the movement enabling part in Animation End.
Here's the code from the attack button and code form the Sword's animation end
WARNING: May be messy
ATTACK BUTTON
---|---|---|---|---|---
if global.noattack = false{
if keyboard_check(ord('Z')){
global.noattack = true
global.nodown = true
global.noleft = true
global.noup = true
global.noright = true
instance_create(Hero.x,Hero.y,Sword)
}};
---|---|---|---|---|---
ANIMATION END
---|---|---|---|---|---
if sprite_index = Sword_down{
Hero.sprite_index = Hero_down
};
if sprite_index = Sword_left{
Hero.sprite_index = Hero_left
};
if sprite_index = Sword_up{
Hero.sprite_index = Hero_up
};
if sprite_index = Sword_right{
Hero.sprite_index = Hero_right
};
global.nodown = false
global.noleft = false
global.noup = false
global.noright = false
global.noattack = false
instance_destroy()