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: Scenery Help  (Read 1692 times)

0 Members and 1 Guest are viewing this topic.

Zero

Scenery Help
« on: October 05, 2007, 11:55:15 pm »
Hey, I am trying to make it so when Link goes behind say a tree, a portion of it is in front of him.  I have an idea, kind of... but not really.  Any ideas?  Thanks.  :D
Logged
Re: Scenery Help
« Reply #1 on: October 06, 2007, 01:10:30 am »
  • The devil in the mirror.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 238
What are you using? GameMaker? If I remember right, it should be something about setting different depths on different parts of the tree.
Logged
Working on my Masters Degree in Computer Science.
Hey look, Zelda Coop....later.
Proud user of C++ for 9 years, and counting!

Zero

Re: Scenery Help
« Reply #2 on: October 06, 2007, 01:30:32 am »
Yea, I am using GM.  Any specific ideas?

Thanks  XD
Logged
Re: Scenery Help
« Reply #3 on: October 06, 2007, 01:35:49 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1141
There are two ways:
1) Use two objects to represent the tree and make each one with a different depth, and have one of them representing the part in front of link and the other representing the part behind link.
2) Make the tree draw two different sprites, alternating the depth before drawing each sprite.
Logged

Zero

Re: Scenery Help
« Reply #4 on: October 06, 2007, 03:02:02 am »
ok, I got it.  Thanks for the help  :)
Logged
Re: Scenery Help
« Reply #5 on: October 06, 2007, 03:18:26 am »
  • Official Forum Hippie/Writer
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 200
Actually, a much better way to do it would be to add the following to every object's step event:

Code: [Select]
depth=y;it might actually be -y though, so try both, I could be wrong...

Also, have an image mask (solid black square).  To do this effectively, make the canvas the same size as your character's sprite, then fill that box half way from the bottom with a solid color.  Make sure to leave a 1 pixel outline of the background color (so, the total image size should be 2 pixels wider and taller).  set the origin of the sprite (the mask) to [1,1] instead of [0,0].  use this sprite as your character's mask.
Logged
Re: Scenery Help
« Reply #6 on: October 07, 2007, 12:15:39 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 57
yeah, what I do is have the base of the tree be solid. I make the base create a non-solid object of the leaves in it's creation event. The leaves object would have a depth less than that of the base.
Logged

Obsequious Eye

King of Glass
Re: Scenery Help
« Reply #7 on: October 07, 2007, 01:52:01 am »
  • Yes, I am mocking you
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 298
Actually, a much better way to do it would be to add the following to every object's step event:

Code: [Select]
depth=y;it might actually be -y though, so try both, I could be wrong...

Also, have an image mask (solid black square).  To do this effectively, make the canvas the same size as your character's sprite, then fill that box half way from the bottom with a solid color.  Make sure to leave a 1 pixel outline of the background color (so, the total image size should be 2 pixels wider and taller).  set the origin of the sprite (the mask) to [1,1] instead of [0,0].  use this sprite as your character's mask.
Yeah, it's depth=-y
It's very useful.
Logged
I'm watching you...
  • Omniscient Eye
Re: Scenery Help
« Reply #8 on: October 07, 2007, 06:14:06 am »
  • Don't Worry Sir, I'm From The Internet.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2339
If its something that you generally won't be interacting with, you might want to have it like this:

1.Create the tiles of the body (or bottom part of the tree) at a depth of 1 or something smaller that link.
2.Create the tiles of the leaves (or top part of the tree) at a depth of -2 or something higher than link.

It's generally best to set links depth at -1 for general purposes seeing as most objects start at 0 depth and you want Link to be in front of most of them.
Logged
Grimace is the demiurge, the creator. From him all things in McDonaldland have sprung. He is not a sin, he's not a menu item, he's just Grimace. He exists. He rolls his lidless eyes and flaps his lipless mouth, formless and terrible, a protean idiot thing from the depths of pre-history.

Zero

Re: Scenery Help
« Reply #9 on: October 08, 2007, 04:35:00 pm »
If its something that you generally won't be interacting with, you might want to have it like this:

1.Create the tiles of the body (or bottom part of the tree) at a depth of 1 or something smaller that link.
2.Create the tiles of the leaves (or top part of the tree) at a depth of -2 or something higher than link.

It's generally best to set links depth at -1 for general purposes seeing as most objects start at 0 depth and you want Link to be in front of most of them.

Yup, exactly what I did  XD
Logged
Pages: [1]   Go Up

 


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



Page created in 0.391 seconds with 58 queries.

anything