yvelocity plz

Game Editor comments and discussion.

yvelocity plz

Postby ThaKid244 » Tue Feb 01, 2011 10:41 pm

hi. I am needing to learn the basic concepts of yvelocity. i understand that it is a very important concept and i want to fully understand it.
what does yvelocity<4 mean?
what does yvelocity+=.8 mean?
yvelocity/2?
yvelocity>=0?
thank you
K Thanks! ;)
User avatar
ThaKid244
 
Posts: 34
Joined: Thu Dec 23, 2010 6:40 pm
Score: 0 Give a positive score

Re: yvelocity plz

Postby sonicfire » Wed Feb 02, 2011 12:15 am

its speed per pixels...as far as i remember. it gives your actor a constant movement/speed.

what does yvelocity<4 mean? <- check if yvelocity is smaller then 4!
what does yvelocity+=.8 mean? <- it means yvelocity = yvelocity + 0.8
yvelocity/2? <- would half the value of velocity
yvelocity>=0? < if yvelocity is bigger than or equal to zero!
sonicfire
 
Posts: 425
Joined: Wed Nov 01, 2006 9:34 pm
Location: berlin germany
Score: 16 Give a positive score

Re: yvelocity plz

Postby ThaKid244 » Wed Feb 02, 2011 12:56 am

what is the yvelocity of a player if he is just standing on the ground being still?
what is the yvelocity of a player at the top of his jump?
K Thanks! ;)
User avatar
ThaKid244
 
Posts: 34
Joined: Thu Dec 23, 2010 6:40 pm
Score: 0 Give a positive score

Re: yvelocity plz

Postby schnellboot » Wed Feb 02, 2011 5:11 am

xM0rtalKomb4tx wrote:what is the yvelocity of a player if he is just standing on the ground being still?
what is the yvelocity of a player at the top of his jump?

you have to decide it yourself ..
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: yvelocity plz

Postby skydereign » Wed Feb 02, 2011 7:19 am

Well, for those two spots, the yvelocity are zero. Usually you would have a draw actor event for your player that increases yvelocity. That way, you have a gravity effect. When you jump, you set the player's yvelocity to some negative number (so he goes up). Each frame the draw event reduces the yvelocity. When it reaches zero, the player is at the top of the jump, and later begins to fall.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron