Page 3 of 3

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 9:48 am
by Jonnee
I was thinking about my idea in the last few hours.

There are a few more problems that I can't solve right now:
The door moves, that's fine. The ball already has a ramp. (see the picture below) But if I put sphere bounds to the ball it doesn't care about the borders of the ramp and the lock bar, they are static triangle mesh. I move into the room and can see that the ball fell down already, although if the lock bar is still closed.
BallDoorRamp.jpg
BallDoorRamp
BallDoorRamp.jpg (24.75 KiB) Viewed 4944 times
<<The Ball is green, the ramp (= 4 stacks) are blue and the door is the red object. Usually the ball should stay inside of the stacks.
If I change the ball's bounds to static triangle mesh it doesn't fall down when the door opens. It's still floating in the air, seems to be stucked between the ramp's borders. I have changed the script, the ball should fall down usually. :?

So it really seems to be the best way to change the ball object's borders to sphere again and to change the script as I did propose.
Let's try to put the ball to a x,y,z-position at the beginning, after click it should fall down by itself, and if we press the button again it disappears (like a hologram or whatever) and returns to it's starting position.

How should the script look like?

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 9:59 am
by D'Lanor
I don't know any Alcscript to warp objects unless you use a (very fast) animation. Warping will probably have to be done in diafero's Python file.

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 11:18 am
by diafero
Which should then of course have a more specific name, but besides, it shouldn't be a problem. I think I also have some Python code which makes it falling down when it floats into the air, but that code does not always work for me - sometimes, if the avatar runs through the object at the wrong time, I can not make it get it's physics back. But in this case, if I understood it correctly, the avatar can not reach the ball, so that should not be a problem.
Jonnee, could you give me an email address I could send you the reseting file to?

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 11:44 am
by D'Lanor
It looks like the ball that won't fall is not really a coding issue but a collider problem.

As for the reset of the ball, let's keep it simple and set it to resetpos. If this really causes multiplayer sync issues (on which I do not trust my memory at all) you can deal with that later.

Add a logic property. Give it type string, name:physlogic and value resetpos.

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 12:05 pm
by Jonnee
Sry, I did forget to tell: The ball has the property "resetpos" already.

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 1:07 pm
by D'Lanor
So problem solved then. Or do you still want to go for the magic? :(

Re: Door doesn't open

PostPosted: Tue Jun 16, 2009 9:28 pm
by Jonnee
Let's try the "magic" way. Beam the ball up on top!! :D

1.) We could place the ball at the beginning (frame 1) infront of the avatar by using the script. We set the x, y and z position.
2.) Then we push the button. The ball moves into the machine by using the script too. I mean it gets beamed in 90 frames into the machine (we set other x, y, z coordinates for the ball inside of the machine), so that noone can see what the ball is doing inside there.
3.) If the ball is inside of the machine it gets beamed in 1 frame on top, we set the last position of the ball. That would mean that noone can see the beaming process. An animation of 1 frame is not visible...
4.) If the ball is on top it should get usual physics of a beachball, so that it should fall down on the ramp as expected.
5.) The end of the ramp, where the ball should stops moving, is infront of the avatar. I will have a look on which coordinates the ball ends, and these coordinates will be placed at point#1. Then it should be possible to repeat the animation again and again...

I swear: Creating a puzzle can be much complex than unravel it. :lol:

By the way: Yesterday I rebuilded the ramp and the lockbar. I was using only colliders to build them. The ball still fell down when it had the sphere borders, and it did not want to move too when it had the static borders... :?

Re: Door doesn't open

PostPosted: Wed Jun 17, 2009 12:02 am
by D'Lanor
Since I cannot talk you out of this we can use an animation to place the ball back. I sent you the Alcscript in a pm. If it works you do not need any Python warping but you still need diafero's script for the sdl reset.