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: Zelda Rolling Code  (Read 1188 times)

0 Members and 1 Guest are viewing this topic.

Zhello

N.A.D.I.
Zelda Rolling Code
« on: June 16, 2009, 09:07:09 pm »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
When I tried me game 2 things occur when I start to roll:
1. After rolling it resets number of rupees and
 2.Instead of actually rolling, I just roll in place rolls in place and
3.  When I roll all instances including monsters freeze in place without moving freely and smoothly afterwards they move.
 

 I tried many things to patch up the code but the other method makes me teleport within the rooms which is not what I want.

For objLink in order to perform this roll we press C:
Quote
instance_create(objLink.x,objLink.y,obj_Link_rolling)
instance_destroy()

Now the step event within the obj_Link_rolling is

Quote
global.Linkx=x
global.Linky=y

if global.facing="left"{
sprite_index=spr_linkrollleft
x -=4}

if global.facing="up"{
sprite_index=spr_linkrollup
y-=4}

if global.facing="right"{
sprite_index=spr_linkrollright
x+=4}

if global.facing="down"{
sprite_index=spr_linkrolldown
y+=4}

After the event is finish the end animation for the code is:

Quote
instance_create(x,y,objLink)
instance_destroy()

The errors I get was from editing the end animation code which was unexpected once game finish loading.

« Last Edit: June 16, 2009, 09:29:33 pm by Linkwolf48 »
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/
Re: Zelda Rolling Code
« Reply #1 on: June 16, 2009, 09:34:16 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Hmmm, if I'm reading this correct your replacing a Link_object, with a Link_roll_object. That isn't really a smart thing to do. What I would do is set the state of Link to rolling and then swap the sprite. It then is pretty much the same like walking. Only there won't be any reaction to pressing any button.

How much programming background do you actually have? Have you read any tutorial on gamemaker, read the help files or even read the topics and/or viewed examples posted on this forum?
Logged

Zhello

N.A.D.I.
Re: Zelda Rolling Code
« Reply #2 on: June 16, 2009, 09:40:27 pm »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
im learn the program little by little lol and this code was form from some research,  Ill try to edited the code more instead of setting it to destroy objLink.  Ill follow up on what you provided.
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/
Pages: [1]   Go Up

 


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



Page created in 0.036 seconds with 44 queries.

anything