Phantom Studios
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Phantom Studios


 
HomePortalSearchLatest imagesRegisterLog in

 

 Mario

Go down 
3 posters
AuthorMessage
Admin
Admin



Number of posts : 109
Registration date : 2007-04-20

Mario Empty
PostSubject: Mario   Mario Icon_minitimeMon Jul 16, 2007 10:42 am

Hey guys, ive been making a Mario game just outta boredome. But I'm having one problem. When i press the left arrow button to move left, mario jumps to the top left of the screen. Every time, and he doesnt move left like i programmed him to.
Also, when i set jumping and gravity, Mario isnt able to move.

Any help?

Also, this is the category in which you can post your MoO thingy.
Back to top Go down
http://halo2dforums.heavenforum.com
Admin
Admin



Number of posts : 109
Registration date : 2007-04-20

Mario Empty
PostSubject: Re: Mario   Mario Icon_minitimeMon Jul 16, 2007 10:44 am

Well, the first problem has been solved Very Happy
But i still need help with the second problem.
Back to top Go down
http://halo2dforums.heavenforum.com
Trotun
Private
Private
Trotun


Number of posts : 31
Age : 32
Registration date : 2007-07-01

Mario Empty
PostSubject: Re: Mario   Mario Icon_minitimeFri Jul 27, 2007 5:21 pm

Hey Avid I"m having the same problem. How did you fix it?
Back to top Go down
Admin
Admin



Number of posts : 109
Registration date : 2007-04-20

Mario Empty
PostSubject: Re: Mario   Mario Icon_minitimeFri Jul 27, 2007 5:55 pm

Make sure if your guys is supposed to move left, you make it '-move_speed'
Left is negative, right is positive. Up is positive, down is negative.
Back to top Go down
http://halo2dforums.heavenforum.com
seath
Private
Private



Number of posts : 60
Registration date : 2007-07-01

Mario Empty
PostSubject: Re: Mario   Mario Icon_minitimeSun Jul 29, 2007 9:18 pm

no, the vertical axis is inverted, up is negative and down is positive, ity screwed me up when i made it.

to jump you have to set the speed to negative on the y-axis to the speed you want the jump to occur at.

To create falling you use the end step event and set gravity
in the same event use the check variable function 'if vspeed is greater than _' to check how fast the object is falling. Use the create a block function underneath that.

Inside the block function use the set speed function to what ever speed was defined by the check variable(represented by the _).

Using that your character will not fall faster than the _, even if there is gravity. Just make sure you have the gravity in the right direction and make sure the collision is good with the ground.
Back to top Go down
Admin
Admin



Number of posts : 109
Registration date : 2007-04-20

Mario Empty
PostSubject: Re: Mario   Mario Icon_minitimeTue Jul 31, 2007 9:30 am

That is now how i move. In the Create event, i make 'Move_speed=5'. Then in the Right arrow action, i make "If position is collision free"-"Jump to given position-x=move_speed"
I do the sorta same thing for moving left.
For jumping, I say "If there is a collision at this position- y=-1" "Jump to given position - y=move_speed"
For Gravity, in the create Event, i make: "If position is collision free - y=-1" "Set gravity 270 to .5"
"Else" "Set gravity 270 to 0"

That always works.
Back to top Go down
http://halo2dforums.heavenforum.com
Sponsored content





Mario Empty
PostSubject: Re: Mario   Mario Icon_minitime

Back to top Go down
 
Mario
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Phantom Studios :: Projects :: Other Projects-
Jump to: