Frictional Games Forum (read-only)

Full Version: Being dragged
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys Blush! I am pretty new to scripting but already getting hang of it. Seems pretty easy if you have brains. But I have no idea tho, is it possible and if it is, how to create like you are dragged? In other words you are low to ground, you move forward, maybe some kind of path if possible and player is looking up or maybe little bit left or right.

Secondly, is it possible to set grunt not aggressive and just put it in front of my dude and force it to move in front of my dude like it is dragging me. If it is not, I can easily do all that without grunt and just put voices instead of grunt. My dude can watch one side and doesnt have to see grunt....

Thank you Smile.
I'm not to sure how to do the dragging part (probably possible) as for making a grunt not aggresive theres an option in the level editor that says Disable Triggers (when you click the grunt) this will make him not react to the player. and then just make some path nodes for him to follow and you could simulate him dragging you.
You can easily do this with AddPlayerBodyForce.

Create a timer that has something like this:

Code:
void Drag (string &in asTimer)
{
     AddPlayerBodyForce(x,y,z,false);
     AddTimer("", 0.1, "Drag");
}

Change X Y and Z to how you want the character to be pushed. For example, if you want him to be dragged forward (along the Z axis, put something like)

Code:
void Drag (string &in asTimer)
{
     AddPlayerBodyForce(0,0,3000,false);
     AddTimer("", 0.1, "Drag");
}

When the player reaches the end area for the destination, just use the RemoveTimer() function.

Also, experiment with

Code:
MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);

and

Code:
FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);
Thank you very much both Smile! You both helped out a lot Smile. I am working with my friend on custom story what you will hear about soon Smile!
Quick question:

What is MovePlayerHeadPos and FadePlayerRollTo default values Smile?
0 for all values.