Jump out

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Jump out

Post by Veleran » Sun Nov 23, 2008 1:45 pm

I wanted the pawn to jump out of a well or a pit.
I tried to add a small order before the idle order for a pawn to jump or move up and then move on the air a little forward so it can come out of a well and land on the floor 32 texels on the front
A Low level order dint work at all (as i used it i saw no pawn) ,the high level order i tried did nt do anything and the script just moves to the next order which is the idle.
Jump and move commands did nt give any action.

I first tried a simple platform to lift the pawn up,but the platform moved the pawn once the first time i tested it only.
The moving platform is set to oneshot - false.Is there any bug with the moving platform and the pawn stays down while the platform moves up through it?

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Jump out

Post by Veleran » Mon Nov 24, 2008 12:28 pm

This order is after the Spawn so the pawn to move out of a well and seem almost like it has jumped out.But it has nt jumped yet.It executes the JumpOut quickly i guess,and moves to the next order-the Idle.

JumpOut[ ()
{
Gravity(false);
Move("Run_3", 180, 152, 0, 90, 0, "");
MoveForward("Run_3", 180, 152, "");
Gravity(true);
NewOrder(Idle);
} ]

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Jump out

Post by metal_head » Mon Nov 24, 2008 10:31 pm

Why the gravity is false? It's because the pawn has to move in the air,right? You can make the order with the Jump(); command?

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Jump out

Post by Veleran » Fri Nov 28, 2008 5:34 pm

Jump command did nt work.And if it worked,could the pawn move on the air 32 texels to the front,
right after the jump?I thought the move command with gravity on must work while the pawn is on the floor.
Unless i try jump,then gravity off and move to the front.
I have time before i make it work,but someday i must do it.

I first tried scriptpoints and a model for zero gravity but it did nt work,and gravity started to be buggy i would say when i added the zeroG model.
And the ladder flagged brush did nt work,nor the entity modelattributes Ladder helped to climb up.
I know that,about the ladders i should post to the level designers topics but does anyone know if the ladder brush can be verticle?
Or does it need some slight slope in order to climb it?
Last edited by Veleran on Fri Nov 28, 2008 11:25 pm, edited 1 time in total.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Jump out

Post by metal_head » Fri Nov 28, 2008 8:17 pm

strange.. I don't really know the answer. Let's hope Juutis will see the post and help you :D

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Jump out

Post by Veleran » Tue Dec 02, 2008 1:43 pm

The script console says pawn spawn nextorder,but does nt execute the jumpout order.

If the pawns could use ladder or ZeroGravity flagged brushes it would be able to come out i guess by moving to scriptpoints.
JumpOut[ ()
{
Gravity(false);
Move("Run_3", 200, 150, 0, -90, 0, "");
MoveForward("Run_3", 130, 30, "");
Gravity(true);
NewOrder(Idle);
} ]

User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: Jump out

Post by bernie » Tue Dec 02, 2008 2:22 pm

JumpOut[ ()
{
Gravity(false);
Move("Run_3", 200, 150, 0, -90, 0, "");
MoveForward("Run_3", 130, 30, "");
Gravity(true);
NewOrder(Idle);
} ]
The script console says pawn spawn nextorder,but does nt execute the jumpout order.

If the pawns could use ladder or ZeroGravity flagged brushes it would be able to come out i guess by moving to scriptpoints.
JumpOut[ ()
{
Gravity(false);
Move("Run_3", 200, 150, 0, -90, 0, "");
MoveForward("Run_3", 130, 30, "");
Gravity(true);
NewOrder(Idle);
} ]
You should be on the right track here. Try using script points and the move to point commands MoveToPoint(string Animation, float Speed, string Sound); set one point above the pawn and the next on forward of that.

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Jump out

Post by Veleran » Tue Dec 02, 2008 11:40 pm

Scriptpoints were the second thing i tried after the zeroG,and it did nt work.
It does nt go to the scriptpoints,it stays to the spawnpoint untill it sees the player,and then tries to attack.

User avatar
bernie
RF Moderator
Posts: 1249
Joined: Tue Nov 15, 2005 10:07 am
Location: Ireland

Re: Jump out

Post by bernie » Wed Dec 03, 2008 11:05 am

But did you use the MoveTo Point() command? Because I used this in my Talisman game and it worked for me.
Look in the goodspirit1.s script and you will see the following order which works perfectly.
Patrol[()
{
FadeIn(1,128);
NextPoint();
MoveToPoint("", 20, "" );
NextPoint();
SetFOV(360);
FindTargetOrder(500,"FoundTarget","health");
AddTimerOrder(1,10,"FoundTarget");
}]

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: Jump out

Post by Veleran » Wed Dec 03, 2008 2:58 pm

I did nt work because i used NextOrder();
at the end of Spawn order,and this NextOrder command needs a scriptpoint with the JumpOut name filled in the Scriptpoint's NextOrder entry.

It worked but bumped to the well walls,because it skipped the upwards scriptpoint and moved diagonally forward and up.

I moved the frst scriptpoint up close to the opening and it managed to come out.
SetNoCollision did nt help.

Then (as i expected) it stopped moving and coming out when it saw the player and tried to run and attack.
I moved the FindTargetOrder under the movetopoint commands but nothing happened.

And then i reduced the sight distance to 50 (the scriptpoints are close to each other)
and set it to alert order after the jumpout,so the alert sightdistance would be normal again.
When it goes back to idle it sees only 50 textels way.
So i set the sight distance back to the normal,and placed the trigger model behind the well and the pawn so it wont see the player untill it comes out.

Post Reply