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: Link Stabbing  (Read 1049 times)

0 Members and 1 Guest are viewing this topic.
Link Stabbing
« on: June 12, 2007, 07:40:45 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
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
Code: [Select]
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);
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Re: Link Stabbing
« Reply #1 on: June 12, 2007, 07:44:17 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
It's highly unlikely that the player be able to press Z and the arrow key at the exact same time, it's best to require that one of them just be held instead.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: Link Stabbing
« Reply #2 on: June 12, 2007, 07:50:26 pm »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
maybe change it to while up is held down then z gets pushed then do the stabed not push up and z at the exact same time
Logged
  • Super Fan Gamers!
Re: Link Stabbing
« Reply #3 on: June 12, 2007, 07:51:12 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
maybe change it to while up is held down then z gets pushed then do the stabed not push up and z at the exact same time
yeah that would work
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Re: Link Stabbing
« Reply #4 on: June 12, 2007, 08:18:35 pm »
  • *
  • Reputation: +12/-2
  • Offline Offline
  • Gender: Male
  • Posts: 4849
No prob!That's what I'm here for!(You know I can't program in GM but I I completely understand how to...lol)
Logged
  • Super Fan Gamers!
Pages: [1]   Go Up

 


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



Page created in 0.618 seconds with 47 queries.

anything