Carrying Objects?

Talk about making games.

Carrying Objects?

Postby Novice » Mon Aug 29, 2005 11:56 am

Hello im new in GE and im making a simple game about stacking books and stuff. I made my actor catch the book and drop it, but the problem is that i cant make the hitbox. So whenever i press space no mather where my charcter is he picks up the book and it apears in his hand. I tried using change parent, and script to limt the hit box to x +-3 but i cant make it work, pls help. Thx. :)

P.S. I would insert an image but i dont know how. :roll:
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score

Postby makslane » Mon Aug 29, 2005 3:10 pm

You can makethis:
1) Create a variable canPick
2) On Collision with the hit actor: canPick = 1;
3) On Collision Finish with the hit actor: canPick = 0;
4) In the Key Down event:
if(canPick)
{
//Pick the book here
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Novice » Mon Aug 29, 2005 5:27 pm

Thanks il try this out.
Why do i always get stuck?
User avatar
Novice
 
Posts: 399
Joined: Mon Aug 29, 2005 10:54 am
Location: Relative
Score: 5 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest