problem with field region collide my player,

Game Editor comments and discussion.

problem with field region collide my player,

Postby Orlando911 » Wed Dec 15, 2010 5:15 pm

I have Problem with my game

actually, i have

1- view (xvelocity = 4;)

1- Player (xvelocity= 4;)
but also I run the all arrow (Right,Left, Up and Down)

3- field region (behind player, in the end of left screen ) to avoid my player to go out of he screen, and I put collision that if he collide the field region he will be get push from right to left,

when I run my game, every thing going okay, but the problem is when I press left and the player collide the field region, the region pushed him, to the right, then when go to right, the player go to right (everything okay ) but when I leave the button, the player go to left again,
(like I pressed the left button but I did not), I don't now how can I fix it ,

and other problem : when my player collied the field region, the field region push the player to the right, but not smoothly, in every second he collide the field region and get pushed , and again and again (do u understand hard to explain hah)
thank you
Orlando911
 
Posts: 84
Joined: Tue Dec 07, 2010 8:18 am
Score: 1 Give a positive score

Re: problem with field region collide my player,

Postby zxcvbnm » Wed Dec 15, 2010 8:18 pm

Orlando did you do any of the tutorials that I made. It will help you learn faster.
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: problem with field region collide my player,

Postby Orlando911 » Wed Dec 15, 2010 8:39 pm

thank you for ur answer,

I follow all the tutorial, I am almost finish my game, with everything, except (sounds, music, start page, ).

I work 14 hours everyday, all my time for building my app, so that everyday I ask question,

really I enjoyed EG, and the way of building Game in EG,

actually before GE, I did research for one month to build Iphone app, I tried everything, even the flash I learned and I build basic thing,

then I decided to quiet it and start with GE. I am focusing 100 % . but there is some point I got problem with like this point that I asked you.
Orlando911
 
Posts: 84
Joined: Tue Dec 07, 2010 8:18 am
Score: 1 Give a positive score

Re: problem with field region collide my player,

Postby skydereign » Thu Dec 16, 2010 1:54 am

Explanation didn't make too much sense, but did you do the caveman tutorial? It uses wireframe regions, and by poking around with that I believe you can get what you want. Since I don't exactly know what the problem is, this might work. If you move to far to the left, you will collide with left side region, and because of that you will be pushed forward with the view (so you stop moving backward). If this is not what you need, we'll need more of a description.
Attachments
reg.ged
(1.44 KiB) Downloaded 72 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: problem with field region collide my player,

Postby Orlando911 » Thu Dec 16, 2010 2:46 am

okay,

do the same work, but, :
1- make the view and player move to right (xvelocity = 4;)
2- the region (parent with view ) .
3- and player can also by press (left button) go to left.

now when you run the game, all of them will move to right,
but when you press left, your player will collide the region, and after this, move right and left, right and left, (he will destroy his balance)
but if you press right and make him go far from region he will be okay,
this is my point.
can I make the same work but I need my player when he collide the region, will move with right with balance movment,
I want the region move him to right,
thank you ,
Orlando911
 
Posts: 84
Joined: Tue Dec 07, 2010 8:18 am
Score: 1 Give a positive score

Re: problem with field region collide my player,

Postby skydereign » Thu Dec 16, 2010 4:16 am

So you know, your steps are exactly what I did... They both move at an xvelocity of 4, and the region is parented to the view. Lastly by pressing left, the player moves left. Do you want the player to move to the center of the screen when the actor collides with the region? Because currently, the version I posted essentially stops the player from moving left, meaning the player is moving right.

Everything is always move right 4 pixels per frame.

If you press left, the player actor moves 2 pixels per frame left (but since it is already moving 4 pixels right, the actor is really moving 2 pixels per frame to the right).
When you collide with the frame, the frame moves the pixel 2 pixels to the right which counters your keydown left (so the player is moving 4 pixels to the right).
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