What im trying to do here is if up,down,left,right is pressed with z global.Stab=true so link can stab but i cant get it 2 work
Information about object: ObjLinkSwing
Sprite: sprLinkSwingD
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: sprLinkShadow
Create Event:
execute code:
image_speed=0.5;
global.usingmenu=1
execute code:
if keyboard_check_pressed(vk_down) && keyboard_check_pressed(ord("Z"))
{
global.Stab=true
}
else{global.Stab=false}
Step Event:
execute code:
if global.GreenGarments=true{
if global.Stab=false
{
if global.facing="D"
{
sprite_index=sprLinkSwingD
}
if global.facing="U"
{
sprite_index=sprLinkSwingU
exit
}
if global.facing="L"
{
sprite_index=sprLinkSwingL
}
if global.facing="R"
{
sprite_index=sprLinkSwingR
}
}
}
execute code:
if global.GreenGarments=true
{
if global.Stab=true
{
if global.facing="D"
{
sprite_index=sprLinkStandD
}
if global.facing="U"
{
sprite_index=sprLinkStandU
}
if global.facing="R"
{
sprite_index=sprLinkStandR
}
if global.facing="L"
{
sprite_index=sprLinkStandL
}
}
}
Other Event: Animation End:
execute code:
instance_destroy();
instance_create(x,y,objLink);