Psyical Resonce Problem

Game Editor comments and discussion.

Psyical Resonce Problem

Postby paperboy321 » Wed Aug 20, 2008 6:07 pm

I need to make the actor when touches a platform makes the actor bounce. Can u guys help thanks alot.
If u think thats the easyest thing in the world. :oops: Well i am kind of new and everytime I test the
game whenever the actor touches a platform the platform falls.

Based on my game:

the platform = (blue thing "Jumper")
the actor = (wheel)


:D :D THANKS :D :D
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby Thanx » Wed Aug 20, 2008 7:57 pm

if ONLY the platform moves, you must have mixed the top bar about which actor should move only... wether it should be the event actor or the collision actor.
If you are creating the collision action in the wheel, then make it say that only move the event actor, And make the Event actor's final velocity mutiplier above 0, depending on how bouncy you want it to be.
:wink:
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 5:30 pm

when ever i do that and touch it. The wheel just stops then shoots off through the walls ( witch is wierd ) or shoots diagonaly. I want it to bounce straight up.
Please Help!! :oops: :oops:
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby j2graves » Thu Aug 21, 2008 5:43 pm

just like in real life, the direction you bounce depends on what angle you hit the other object. if you want to make it bounce straight up, then try a code like this:

on the collision event, do a script editor action like this:
yvelocity = yvelocity - 10;
hope that works the way I think it will.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 5:48 pm

No it just goes right thought it
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby pyrometal » Thu Aug 21, 2008 5:50 pm

Also add in that same script "xvelocity = 0;" to stop the horizontal movement.
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Psyical Resonce Problem

Postby j2graves » Thu Aug 21, 2008 5:51 pm

could you post a screenshot? just press prtsc/sysrq ingame.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Psyical Resonce Problem

Postby j2graves » Thu Aug 21, 2008 5:52 pm

wait, are you talking about the floor, wall or ceiling?
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 6:24 pm

j2graves wrote:wait, are you talking about the floor, wall or ceiling?


Wall
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby j2graves » Thu Aug 21, 2008 6:27 pm

then do this:
collision >
on > left side>
of >
wall >
xvelocity = xvelocity - 5;

do the same to the right side only have it

xvelocity = xvelocity + 5;

and don't forget to have a physical response that has repeat changed to "enable"

(only include the xvelocity thing if you want it to bounce straight back.)
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: Psyical Resonce Problem

Postby Thanx » Thu Aug 21, 2008 6:40 pm

First of all, if it is a wall, and since Physical responce is giving funny results, using j2graves' way, do this in the collision event:
xvelocity *= -1;
What does this do? It makes the wheel do an opposite horizontal motion than it has been doing.
Though as I take it from your words, a collision may come from any angle, so we have to be ready for both axises.
xvelocity *= -1;
yvelocity *= -1;
If you want to slow it down a bit, then multiply it with something a littlebit below -1.

Also this wierd bug you have, of passing through walls? That's cause you set their mass to a low level, so they may not be able to handle impact of the actor comming at it really fast. To exclude such possibilties, just set the mass that should be calculated, for the platform higher, like 10 should do I think...
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 6:44 pm

it still falls
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 6:46 pm

I am so stuped. I mean floor. I want it to bounce off the floor.
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby paperboy321 » Thu Aug 21, 2008 6:59 pm

j2graves wrote:could you post a screenshot? just press prtsc/sysrq ingame.


wat does this mean prtsc/sysrq
PaPeR BoY
User avatar
paperboy321
 
Posts: 67
Joined: Mon Jun 09, 2008 11:08 pm
Score: 0 Give a positive score

Re: Psyical Resonce Problem

Postby Thanx » Thu Aug 21, 2008 7:22 pm

paperboy321 wrote:
j2graves wrote:could you post a screenshot? just press prtsc/sysrq ingame.


wat does this mean prtsc/sysrq

Print Screen - next to F12, if you're using a keyboard similar to mine.

paperboy321 wrote:it still falls

This is getting me confused now. What falls??? The platform? Let's go over our possabilities slowly.
1. Examin which actor we have the collision event registered in at the moment, cause that will cause problems.
If you answer to it was player, then if the platform surely moves, first check your scripts, search all possible places for a
code that may tell platform to be moved in any means (that is: codes like MoveTo, platform.x or y = platform. x or y
velocity = something. If this possability is completely excluded:
Check wether you have accidentaly left physical responce in. Since the code we gave you above is simpler, delete the
physical responce. let me correct my earlier post: If it is a wall, only do xvelocity *= -1; If it is a floor, then only use
yvelocity *= -1;
2.If your answer was that the codes are in platform, then we might be in some trouble. Now if you haven't checked for codes
I mentioned in 1, then check that out. Check wether you have physical response still in there. If so probably it was what
caused this, because we have been giving you advice assuming code being in the player's codes. If you've been writing the
codes here, then don't take them out, just infront of the x or yvelocity, put the name of the actor for the player, and then
a dot. So if the name for the player actor was Jumper, then code should look like this: Jumper.yvelocity *= -1;
Again, as I said in 1, depending on what kinda object the collision is with, only use one of the lines of code.
3.If all this might not have worked, then theres either something I/we missed, or it is another mysterious GE bug...

Hope this finally helps :!:
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron