The Daily Click ::. Forums ::. Klik Coding Help ::. Zelda Lifting Objects
 

Post Reply  Post Oekaki 
 

Posted By Message

Devernath



Registered
  04/12/2004
Points
  54

VIP Member
6th March, 2008 at 19:38:46 -

Hey, its me again, with another Zelda query!

Ok, you know how you can lift stuff and throw them?

I was kinda fleshing out an idea on how to do it, but I predict it will be prone to erratic animation and glitchiness.

I was thinking of having collision detectors around the character and when they overlap the rock, destroy rock, and make another active object which just looks like the pot, and have it position itself ontop of the link animation of lifting something. Then, if player presses the button again, restore animation, and use internal flags to determine how long the pot should fly before it brakes.

Sounds a bit weird though. Anyone have a better idea of doing it.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14456

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
6th March, 2008 at 21:19:03 -

you don't need to make another object,

well if you use four detectors for collisions you can also use them for picking things up too.

Um how about making a simple flag that tells it whether to collide with link and also if it's picked up?

try something like this, not actual events but just pseudo code or whatever you call it

Pot's Flag 0 = off (collisions on)
Pot's Flag 0 = off (don't follow link)

pressed fire 1 + pot is overlapping a detector + post's flag = off (set post's flag 0 on)

Pot's Flag 1 = off (collisions off)
Pot's Flag 1 = off (follow link)
Pot's Flag 1 = off (set direction to link's direction)

pressed fire 1 + pot is overlapping link + pot's flag = on (throw)

and throwing can be quite easy to do, if you're using The games factory you wont have many alterable values, so just use 1 for the length that the pot will be in the air for.
when it's thrown set pot's value A to 50. then make another event that says when value a is above 0 subtract 1.
then make another that says when pot's value A = 1 destroy.

and for the direction of the pot? well it's already facing the same way as link, so make 4 more events

if pot's direction is up and alterable value is greater than 0 set it's Y value relative to it's own Y value -2 (and do the other 4 like that)

that should work relatively well.

i just realized whilst making an example that the detectors could grab two pots at once unless you make them small enough, so it might not a good idea use the collision detectors

Image Edited by the Author.

 
.

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
6th March, 2008 at 23:46:23 -

You'd only need to have the detecotors to be 1 pixel thick, thats basically how big they are in LttP anyhow.

 
lol

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14456

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
7th March, 2008 at 12:28:31 -

Yup i was making an example and made detectors 1 pixel in size.

Didn't finish it though.

 
.

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  531

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
7th March, 2008 at 18:27:57 -

I didn't make this, but there's a pretty accurate zelda 3 engine that I found lost in the depths of my HDD just now. If your making a Zelda 3 styled game then I hope this helps:

http://www.verchiesoft.com/other/tdc/examples/zelda.gam

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click