Page 1 of 2

Psyical Resonce Problem

PostPosted: Wed Aug 20, 2008 6:07 pm
by paperboy321
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

Re: Psyical Resonce Problem

PostPosted: Wed Aug 20, 2008 7:57 pm
by Thanx
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:

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:30 pm
by paperboy321
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:

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:43 pm
by j2graves
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.

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:48 pm
by paperboy321
No it just goes right thought it

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:50 pm
by pyrometal
Also add in that same script "xvelocity = 0;" to stop the horizontal movement.

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:51 pm
by j2graves
could you post a screenshot? just press prtsc/sysrq ingame.

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 5:52 pm
by j2graves
wait, are you talking about the floor, wall or ceiling?

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:24 pm
by paperboy321
j2graves wrote:wait, are you talking about the floor, wall or ceiling?


Wall

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:27 pm
by j2graves
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.)

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:40 pm
by Thanx
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...

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:44 pm
by paperboy321
it still falls

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:46 pm
by paperboy321
I am so stuped. I mean floor. I want it to bounce off the floor.

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 6:59 pm
by paperboy321
j2graves wrote:could you post a screenshot? just press prtsc/sysrq ingame.


wat does this mean prtsc/sysrq

Re: Psyical Resonce Problem

PostPosted: Thu Aug 21, 2008 7:22 pm
by Thanx
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 :!: