Frictional Games Forum (read-only)
Being dragged - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Being dragged (/thread-9782.html)



Being dragged - Elven - 08-15-2011

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.


RE: Being dragged - GreyFox - 08-15-2011

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.


RE: Being dragged - DamnNoHtml - 08-15-2011

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);



RE: Being dragged - Elven - 08-15-2011

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!


RE: Being dragged - Elven - 08-16-2011

Quick question:

What is MovePlayerHeadPos and FadePlayerRollTo default values Smile?


RE: Being dragged - DamnNoHtml - 08-16-2011

0 for all values.