Door doesn't open

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Door doesn't open

Postby Jonnee » Tue Jun 16, 2009 9:48 am

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 4789 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?
Last edited by Jonnee on Tue Jun 16, 2009 10:07 am, edited 2 times in total.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Door doesn't open

Postby D'Lanor » Tue Jun 16, 2009 9:59 am

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.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Door doesn't open

Postby diafero » Tue Jun 16, 2009 11:18 am

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?
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: Door doesn't open

Postby D'Lanor » Tue Jun 16, 2009 11:44 am

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.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Door doesn't open

Postby Jonnee » Tue Jun 16, 2009 12:05 pm

Sry, I did forget to tell: The ball has the property "resetpos" already.
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Door doesn't open

Postby D'Lanor » Tue Jun 16, 2009 1:07 pm

So problem solved then. Or do you still want to go for the magic? :(
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Door doesn't open

Postby Jonnee » Tue Jun 16, 2009 9:28 pm

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... :?
User avatar
Jonnee
 
Posts: 266
Joined: Fri Nov 16, 2007 9:45 pm

Re: Door doesn't open

Postby D'Lanor » Wed Jun 17, 2009 12:02 am

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.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron