HELP! My pawn won't fall!

Topics regarding Scripting with Reality Factory
Post Reply
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

HELP! My pawn won't fall!

Post by Danimita92 »

My scripted player was okay, but suddenly it doesn't detect if it's falling. It plays the idle animation, and really slowly starts falling.
It was okay, but after playing with a couple of things, now it won't fall. I've put it back to how it was, but still won't detect if it's falling, and gravity is really slow.

EDIT:
Okay, I discovered it's a script in the level, that has a positiontopawn to this pawn. When I have this script, the other pawn won't detect if it's falling. Here's the script that's got the positiontopawn:

Code: Select all

{

Spawn[()
{
Console(true);
LowLevel("Init");
}]

Init[()
{
    PositionToPawn("jugador",0,0,0,false,false);
    ChangeYaw();
    self.yaw_speed=200;
    self.ideal_yaw=self.player_yaw;
    PawnRender(true);
}]

}
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: HELP! My pawn won't fall!

Post by QuestOfDreams »

Hm, I'm not sure but maybe your scripted player detects collision with the other pawn and that causes him to not realize that he's falling. If the 2nd pawn doesn't need collision you may try to disable collision detection for him. :?
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

Didn't work.
EDIT: Taken the scripted player script out, because it happens with any pawn i positiontopawn it to.
Last edited by Danimita92 on Thu May 08, 2008 7:29 pm, edited 1 time in total.
User avatar
ardentcrest
Posts: 735
Joined: Wed Jan 25, 2006 10:55 pm
Location: Ireland

Re: HELP! My pawn won't fall!

Post by ardentcrest »

This is one of our Spanish bothers. can any one see something that he has missed in his script.

there must be a confilct in the script.

any help here...
He's a Bot Jim, But not as we know It.
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

Ok, i've discovered a couple of things. I take out every pawn except this one, and the one in the positiontopawn and it still happens. Also, I try changing the pawn it does the positiontopawn to, and the same thing will happen to it, so it's not the scripted player
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

AND on top of that, I sent it to another guy from the spanish forum, and he put it in his level, changing the positiontopawn so it would go to a pawn in his level, he put it a little high above the ground, and the same thing happened.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: HELP! My pawn won't fall!

Post by QuestOfDreams »

Can you send me a basic setup of the problem so I can test it?
realityfactory at gmx.at
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

sent.
BTW, could this be a bug?
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: HELP! My pawn won't fall!

Post by QuestOfDreams »

Sorry, it took me so long to look at this. The problem is - as I suspected - that the 2 pawns are colliding. The last command in the script you posted above - PawnRender(true); - not only makes the pawn visible but also activates collision detection.
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

Uh, actually no. It also happens when it's in pawnrender false. But I changed the order of the commands and it worked:

Code: Select all

{

Spawn[()
{
Console(true);
SetNoCollision();
LowLevel("Init");
}]

Init[()
{
    PositionToPawn("jugador",0,0,0,false,false);
    ChangeYaw();
    self.yaw_speed=200;
    self.ideal_yaw=self.player_yaw;
    PawnRender(true);
}]

}
PS: I had already tried using The SetNoCollision, and it didn't work.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: HELP! My pawn won't fall!

Post by QuestOfDreams »

Actually yes. Use the scripts you sent me and comment out the PawnRender(true) command in the rotation.s script and it will work fine.
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

Actually I only turned it to true because I put the robot act, with a setnocollision just to see where it was to try and figure out the problem. But the problem was already there when it was set to false.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: HELP! My pawn won't fall!

Post by QuestOfDreams »

I guess we're talking at cross purposes now ...
My point is: if you first use SetNoCollision() and call PawnRender(true) afterwards, then the SetNoCollision() is useless because PawnRender(true) nullifies the effect.
Anyways, if it works for you now, I consider the problem as solved.
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: HELP! My pawn won't fall!

Post by Danimita92 »

Oh, thanks QOD i just understood what you meant. Okay, okay.
Post Reply